]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
video: s3c-fb: fix checkpatch errors and warning
authorJingoo Han <jg1.han@samsung.com>
Fri, 1 Apr 2011 07:17:27 +0000 (07:17 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 6 Apr 2011 16:44:57 +0000 (09:44 -0700)
This patch fixes the checkpatch errors listed below:

ERROR: space required before the open parenthesis '('
ERROR: need consistent spacing around '+' (ctx:WxV)
ERROR: space prohibited before that close parenthesis ')'

Also, following warning is fixed by adding 'platid' variable
which can reduce number of lines exceeding 80 characters.

WARNING: line over 80 characters

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/video/s3c-fb.c

index 6817d187d46eac726b7cd44349b51ae480188155..3b6cdcac8f1a6a930dd49399dd4af97a9a835a8b 100644 (file)
@@ -48,7 +48,7 @@
 #undef writel
 #define writel(v, r) do { \
        printk(KERN_DEBUG "%s: %08x => %p\n", __func__, (unsigned int)v, r); \
-       __raw_writel(v, r); } while(0)
+       __raw_writel(v, r); } while (0)
 #endif /* FB_S3C_DEBUG_REGWRITE */
 
 /* irq_flags bits */
@@ -518,7 +518,7 @@ static int s3c_fb_set_par(struct fb_info *info)
 
                data = VIDTCON2_LINEVAL(var->yres - 1) |
                       VIDTCON2_HOZVAL(var->xres - 1);
-               writel(data, regs +sfb->variant.vidtcon + 8 );
+               writel(data, regs + sfb->variant.vidtcon + 8);
        }
 
        /* write the buffer address */
@@ -1304,6 +1304,7 @@ static void s3c_fb_clear_win(struct s3c_fb *sfb, int win)
 
 static int __devinit s3c_fb_probe(struct platform_device *pdev)
 {
+       const struct platform_device_id *platid;
        struct s3c_fb_driverdata *fbdrv;
        struct device *dev = &pdev->dev;
        struct s3c_fb_platdata *pd;
@@ -1312,7 +1313,8 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
        int win;
        int ret = 0;
 
-       fbdrv = (struct s3c_fb_driverdata *)platform_get_device_id(pdev)->driver_data;
+       platid = platform_get_device_id(pdev);
+       fbdrv = (struct s3c_fb_driverdata *)platid->driver_data;
 
        if (fbdrv->variant.nr_windows > S3C_FB_MAX_WIN) {
                dev_err(dev, "too many windows, cannot attach\n");