ARM: s3c24xx: formatting cleanup in mach-mini2440.c

Running:
    scripts/checkpatch.pl -f arch/arm/mach-s3c24xx/mach-mini2440.c
revealed several errors and warnings.

They were all removed, except one which is an #if 0 around the declaration
of a gpio pin. This needs some more investigation and I prefer to let it
here. This is not some dead code.

'printk' was replaced by 'pr_info'.

Signed-off-by: Cedric Roux <sed@free.fr>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
This commit is contained in:
Cedric Roux 2018-09-07 23:54:45 +02:00 committed by Krzysztof Kozlowski
parent b2a13da505
commit e728e4f201

View File

@ -64,8 +64,8 @@ static struct map_desc mini2440_iodesc[] __initdata = {
}; };
#define UCON S3C2410_UCON_DEFAULT #define UCON S3C2410_UCON_DEFAULT
#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE #define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE)
static struct s3c2410_uartcfg mini2440_uartcfgs[] __initdata = { static struct s3c2410_uartcfg mini2440_uartcfgs[] __initdata = {
@ -160,7 +160,8 @@ static struct s3c2410fb_display mini2440_lcd_cfg[] __initdata = {
1024, 1, 2, 2, /* y timing */ 1024, 1, 2, 2, /* y timing */
768, 200, 16, 16, /* x timing */ 768, 200, 16, 16, /* x timing */
24), /* refresh rate, maximum stable, 24), /* refresh rate, maximum stable,
tested with the FPGA shield */ * tested with the FPGA shield
*/
.lcdcon5 = (S3C2410_LCDCON5_FRM565 | .lcdcon5 = (S3C2410_LCDCON5_FRM565 |
S3C2410_LCDCON5_HWSWP), S3C2410_LCDCON5_HWSWP),
}, },
@ -196,7 +197,8 @@ static struct s3c2410fb_mach_info mini2440_fb_info __initdata = {
/* Enable VD[2..7], VD[10..15], VD[18..23] and VCLK, syncs, VDEN /* Enable VD[2..7], VD[10..15], VD[18..23] and VCLK, syncs, VDEN
* and disable the pull down resistors on pins we are using for LCD * and disable the pull down resistors on pins we are using for LCD
* data. */ * data.
*/
.gpcup = (0xf << 1) | (0x3f << 10), .gpcup = (0xf << 1) | (0x3f << 10),
@ -254,7 +256,8 @@ static struct mtd_partition mini2440_default_nand_part[] __initdata = {
[2] = { [2] = {
.name = "kernel", .name = "kernel",
/* 5 megabytes, for a kernel with no modules /* 5 megabytes, for a kernel with no modules
* or a uImage with a ramdisk attached */ * or a uImage with a ramdisk attached
*/
.size = 0x00500000, .size = 0x00500000,
.offset = SZ_256K + SZ_128K, .offset = SZ_256K + SZ_128K,
}, },
@ -290,7 +293,7 @@ static struct s3c2410_platform_nand mini2440_nand_info __initdata = {
static struct resource mini2440_dm9k_resource[] = { static struct resource mini2440_dm9k_resource[] = {
[0] = DEFINE_RES_MEM(MACH_MINI2440_DM9K_BASE, 4), [0] = DEFINE_RES_MEM(MACH_MINI2440_DM9K_BASE, 4),
[1] = DEFINE_RES_MEM(MACH_MINI2440_DM9K_BASE + 4, 4), [1] = DEFINE_RES_MEM(MACH_MINI2440_DM9K_BASE + 4, 4),
[2] = DEFINE_RES_NAMED(IRQ_EINT7, 1, NULL, IORESOURCE_IRQ \ [2] = DEFINE_RES_NAMED(IRQ_EINT7, 1, NULL, IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHEDGE), | IORESOURCE_IRQ_HIGHEDGE),
}; };
@ -362,7 +365,8 @@ static struct gpio_keys_button mini2440_buttons[] = {
}, },
#if 0 #if 0
/* this pin is also known as TCLK1 and seems to already /* this pin is also known as TCLK1 and seems to already
* marked as "in use" somehow in the kernel -- possibly wrongly */ * marked as "in use" somehow in the kernel -- possibly wrongly
*/
{ {
.gpio = S3C2410_GPG(11), /* K6 */ .gpio = S3C2410_GPG(11), /* K6 */
.code = KEY_F6, .code = KEY_F6,
@ -564,7 +568,8 @@ static char mini2440_features_str[12] __initdata = "0tb";
static int __init mini2440_features_setup(char *str) static int __init mini2440_features_setup(char *str)
{ {
if (str) if (str)
strlcpy(mini2440_features_str, str, sizeof(mini2440_features_str)); strlcpy(mini2440_features_str, str,
sizeof(mini2440_features_str));
return 1; return 1;
} }
@ -598,13 +603,14 @@ static void __init mini2440_parse_features(
switch (f) { switch (f) {
case '0'...'9': /* tft screen */ case '0'...'9': /* tft screen */
if (features->done & FEATURE_SCREEN) { if (features->done & FEATURE_SCREEN) {
printk(KERN_INFO "MINI2440: '%c' ignored, " pr_info("MINI2440: '%c' ignored, screen type already set\n",
"screen type already set\n", f); f);
} else { } else {
int li = f - '0'; int li = f - '0';
if (li >= ARRAY_SIZE(mini2440_lcd_cfg)) if (li >= ARRAY_SIZE(mini2440_lcd_cfg))
printk(KERN_INFO "MINI2440: " pr_info("MINI2440: '%c' out of range LCD mode\n",
"'%c' out of range LCD mode\n", f); f);
else { else {
features->optional[features->count++] = features->optional[features->count++] =
&s3c_device_lcd; &s3c_device_lcd;
@ -615,8 +621,8 @@ static void __init mini2440_parse_features(
break; break;
case 'b': case 'b':
if (features->done & FEATURE_BACKLIGHT) if (features->done & FEATURE_BACKLIGHT)
printk(KERN_INFO "MINI2440: '%c' ignored, " pr_info("MINI2440: '%c' ignored, backlight already set\n",
"backlight already set\n", f); f);
else { else {
features->optional[features->count++] = features->optional[features->count++] =
&mini2440_led_backlight; &mini2440_led_backlight;
@ -624,13 +630,13 @@ static void __init mini2440_parse_features(
features->done |= FEATURE_BACKLIGHT; features->done |= FEATURE_BACKLIGHT;
break; break;
case 't': case 't':
printk(KERN_INFO "MINI2440: '%c' ignored, " pr_info("MINI2440: '%c' ignored, touchscreen not compiled in\n",
"touchscreen not compiled in\n", f); f);
break; break;
case 'c': case 'c':
if (features->done & FEATURE_CAMERA) if (features->done & FEATURE_CAMERA)
printk(KERN_INFO "MINI2440: '%c' ignored, " pr_info("MINI2440: '%c' ignored, camera already registered\n",
"camera already registered\n", f); f);
else else
features->optional[features->count++] = features->optional[features->count++] =
&s3c_device_camif; &s3c_device_camif;
@ -645,7 +651,7 @@ static void __init mini2440_init(void)
struct mini2440_features_t features = { 0 }; struct mini2440_features_t features = { 0 };
int i; int i;
printk(KERN_INFO "MINI2440: Option string mini2440=%s\n", pr_info("MINI2440: Option string mini2440=%s\n",
mini2440_features_str); mini2440_features_str);
/* Parse the feature string */ /* Parse the feature string */
@ -674,17 +680,17 @@ static void __init mini2440_init(void)
mini2440_fb_info.displays = mini2440_fb_info.displays =
&mini2440_lcd_cfg[features.lcd_index]; &mini2440_lcd_cfg[features.lcd_index];
printk(KERN_INFO "MINI2440: LCD"); pr_info("MINI2440: LCD");
for (li = 0; li < ARRAY_SIZE(mini2440_lcd_cfg); li++) for (li = 0; li < ARRAY_SIZE(mini2440_lcd_cfg); li++)
if (li == features.lcd_index) if (li == features.lcd_index)
printk(" [%d:%dx%d]", li, pr_info(" [%d:%dx%d]", li,
mini2440_lcd_cfg[li].width, mini2440_lcd_cfg[li].width,
mini2440_lcd_cfg[li].height); mini2440_lcd_cfg[li].height);
else else
printk(" %d:%dx%d", li, pr_info(" %d:%dx%d", li,
mini2440_lcd_cfg[li].width, mini2440_lcd_cfg[li].width,
mini2440_lcd_cfg[li].height); mini2440_lcd_cfg[li].height);
printk("\n"); pr_info("\n");
s3c24xx_fb_set_platdata(&mini2440_fb_info); s3c24xx_fb_set_platdata(&mini2440_fb_info);
} }