Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

video: s3c2410: fix checkpatch error and warnings

This patch fixes the checkpatch errors listed below:

ERROR: do not initialise statics to 0 or NULL
WARNING: Use #include <linux/io.h> instead of <asm/io.h>
WARNING: braces {} are not necessary for single statement blocks
WARNING: braces {} are not necessary for any arm of this statement
WARNING: static char array declaration should probably be static const char
WARNING: line over 80 characters
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>

authored by

Jingoo Han and committed by
Florian Tobias Schandinat
f940b88d 69166ed0

+15 -14
+15 -14
drivers/video/s3c2410fb.c
··· 26 26 #include <linux/platform_device.h> 27 27 #include <linux/clk.h> 28 28 #include <linux/cpufreq.h> 29 + #include <linux/io.h> 29 30 30 - #include <asm/io.h> 31 31 #include <asm/div64.h> 32 32 33 33 #include <asm/mach/map.h> ··· 45 45 #ifdef CONFIG_FB_S3C2410_DEBUG 46 46 static int debug = 1; 47 47 #else 48 - static int debug = 0; 48 + static int debug; 49 49 #endif 50 50 51 - #define dprintk(msg...) if (debug) { printk(KERN_DEBUG "s3c2410fb: " msg); } 51 + #define dprintk(msg...) if (debug) printk(KERN_DEBUG "s3c2410fb: " msg); 52 52 53 53 /* useful functions */ 54 54 ··· 567 567 568 568 tpal_reg += is_s3c2412(fbi) ? S3C2412_TPAL : S3C2410_TPAL; 569 569 570 - if (blank_mode == FB_BLANK_POWERDOWN) { 570 + if (blank_mode == FB_BLANK_POWERDOWN) 571 571 s3c2410fb_lcd_enable(fbi, 0); 572 - } else { 572 + else 573 573 s3c2410fb_lcd_enable(fbi, 1); 574 - } 575 574 576 575 if (blank_mode == FB_BLANK_UNBLANK) 577 576 writel(0x0, tpal_reg); ··· 811 812 #endif 812 813 813 814 814 - static char driver_name[] = "s3c2410fb"; 815 + static const char driver_name[] = "s3c2410fb"; 815 816 816 817 static int __devinit s3c24xxfb_probe(struct platform_device *pdev, 817 818 enum s3c_drv_type drv_type) ··· 880 881 goto release_mem; 881 882 } 882 883 883 - info->irq_base = info->io + ((drv_type == DRV_S3C2412) ? S3C2412_LCDINTBASE : S3C2410_LCDINTBASE); 884 + if (drv_type == DRV_S3C2412) 885 + info->irq_base = info->io + S3C2412_LCDINTBASE; 886 + else 887 + info->irq_base = info->io + S3C2410_LCDINTBASE; 884 888 885 889 dprintk("devinit\n"); 886 890 ··· 929 927 clk_enable(info->clk); 930 928 dprintk("got and enabled clock\n"); 931 929 932 - msleep(1); 930 + usleep_range(1000, 1000); 933 931 934 932 info->clk_rate = clk_get_rate(info->clk); 935 933 ··· 977 975 978 976 /* create device files */ 979 977 ret = device_create_file(&pdev->dev, &dev_attr_debug); 980 - if (ret) { 978 + if (ret) 981 979 printk(KERN_ERR "failed to add debug attribute\n"); 982 - } 983 980 984 981 printk(KERN_INFO "fb%d: %s frame buffer device\n", 985 982 fbinfo->node, fbinfo->fix.id); ··· 1028 1027 s3c2410fb_cpufreq_deregister(info); 1029 1028 1030 1029 s3c2410fb_lcd_enable(info, 0); 1031 - msleep(1); 1030 + usleep_range(1000, 1000); 1032 1031 1033 1032 s3c2410fb_unmap_video_memory(fbinfo); 1034 1033 ··· 1065 1064 * the LCD DMA engine is not going to get back on the bus 1066 1065 * before the clock goes off again (bjd) */ 1067 1066 1068 - msleep(1); 1067 + usleep_range(1000, 1000); 1069 1068 clk_disable(info->clk); 1070 1069 1071 1070 return 0; ··· 1077 1076 struct s3c2410fb_info *info = fbinfo->par; 1078 1077 1079 1078 clk_enable(info->clk); 1080 - msleep(1); 1079 + usleep_range(1000, 1000); 1081 1080 1082 1081 s3c2410fb_init_registers(fbinfo); 1083 1082