Merge ../linus
[powerpc.git] / drivers / video / sstfb.c
index 8a5ce21..dad54e7 100644 (file)
@@ -32,7 +32,7 @@
 
 -TODO: at one time or another test that the mode is acceptable by the monitor
 -ASK: Can I choose different ordering for the color bitfields (rgba argb ...)
-      wich one should i use ? is there any preferred one ? It seems ARGB is
+      which one should i use ? is there any preferred one ? It seems ARGB is
       the one ...
 -TODO: in  set_var check the validity of timings (hsync vsync)...
 -TODO: check and recheck the use of sst_wait_idle : we don't flush the fifo via
@@ -82,7 +82,6 @@
  * Includes
  */
 
-#include <linux/config.h>
 #include <linux/string.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
@@ -771,8 +770,7 @@ static int sstfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
        return 0;
 }
 
-static int sstfb_ioctl(struct inode *inode, struct file *file,
-                       u_int cmd, u_long arg, struct fb_info *info )
+static int sstfb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
 {
        struct sstfb_par *par = info->par;
        struct pci_dev *sst_dev = par->dev;
@@ -1195,10 +1193,11 @@ static struct dac_switch dacs[] __devinitdata = {
 static int __devinit sst_detect_dactype(struct fb_info *info, struct sstfb_par *par)
 {
        int i, ret = 0;
-       
-       for (i=0; i<sizeof(dacs)/sizeof(dacs[0]); i++) {
+
+       for (i = 0; i < ARRAY_SIZE(dacs); i++) {
                ret = dacs[i].detect(info);
-               if (ret) break;
+               if (ret)
+                       break;
        }
        if (!ret)
                return 0;
@@ -1605,8 +1604,8 @@ static int sstfb_dump_regs(struct fb_info *info)
                {FBZMODE,"fbzmode"},
        };
 
-       const int pci_s = sizeof(pci_regs)/sizeof(pci_regs[0]);
-       const int sst_s = sizeof(sst_regs)/sizeof(sst_regs[0]);
+       const int pci_s = ARRAY_SIZE(pci_regs);
+       const int sst_s = ARRAY_SIZE(sst_regs);
        struct sstfb_par *par = info->par;
        struct pci_dev *dev = par->dev;
        u32 pci_res[pci_s];