* [PATCH 21/25] drivers/video: Use static const char arrays
[not found] <cover.1284406638.git.joe@perches.com>
@ 2010-09-13 19:47 ` Joe Perches
2010-09-15 19:02 ` James Simmons
0 siblings, 1 reply; 2+ messages in thread
From: Joe Perches @ 2010-09-13 19:47 UTC (permalink / raw)
To: linux-kernel
Cc: Thomas Winischhofer, Joseph Chan, Florian Tobias Schandinat,
linux-fbdev
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/video/sh_mipi_dsi.c | 4 ++--
drivers/video/sis/sis_main.c | 10 +++++-----
drivers/video/via/viafbdev.c | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/video/sh_mipi_dsi.c b/drivers/video/sh_mipi_dsi.c
index 5699ce0..4a8501b 100644
--- a/drivers/video/sh_mipi_dsi.c
+++ b/drivers/video/sh_mipi_dsi.c
@@ -319,7 +319,7 @@ static int __init sh_mipi_probe(struct platform_device *pdev)
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
unsigned long rate, f_current;
int idx = pdev->id, ret;
- char dsip_clk[] = "dsi.p_clk";
+ char dsip_clk[sizeof("dsiXp_clk")];
if (!res || idx >= ARRAY_SIZE(mipi_dsi) || !pdata)
return -ENODEV;
@@ -370,7 +370,7 @@ static int __init sh_mipi_probe(struct platform_device *pdev)
dev_dbg(&pdev->dev, "DSI-T clk %lu -> %lu\n", f_current, rate);
- sprintf(dsip_clk, "dsi%1.1dp_clk", idx);
+ sprintf(dsip_clk, "dsi%cp_clk", idx + '0');
mipi->dsip_clk = clk_get(&pdev->dev, dsip_clk);
if (IS_ERR(mipi->dsip_clk)) {
ret = PTR_ERR(mipi->dsip_clk);
diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c
index 559bf17..4be65d1 100644
--- a/drivers/video/sis/sis_main.c
+++ b/drivers/video/sis/sis_main.c
@@ -2387,8 +2387,8 @@ SiS_Sense30x(struct sis_video_info *ivideo)
u16 cvbs=0, cvbs_c=0;
u16 vga2=0, vga2_c=0;
int myflag, result;
- char stdstr[] = "sisfb: Detected";
- char tvstr[] = "TV connected to";
+ static const char stdstr[] = "sisfb: Detected";
+ static const char tvstr[] = "TV connected to";
if(ivideo->vbflags2 & VB2_301) {
svhs = 0x00b9; cvbs = 0x00b3; vga2 = 0x00d1;
@@ -2525,7 +2525,7 @@ SiS_SenseCh(struct sis_video_info *ivideo)
{
#if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315)
u8 temp1, temp2;
- char stdstr[] = "sisfb: Chrontel: Detected TV connected to";
+ static const char stdstr[] = "sisfb: Chrontel: Detected TV connected to";
#endif
#ifdef CONFIG_FB_SIS_300
unsigned char test[3];
@@ -2648,8 +2648,8 @@ SiS_SenseCh(struct sis_video_info *ivideo)
static void __devinit
sisfb_get_VB_type(struct sis_video_info *ivideo)
{
- char stdstr[] = "sisfb: Detected";
- char bridgestr[] = "video bridge";
+ static const char stdstr[] = "sisfb: Detected";
+ static const char bridgestr[] = "video bridge";
u8 vb_chipid;
u8 reg;
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c
index 5a947b0..394ef48 100644
--- a/drivers/video/via/viafbdev.c
+++ b/drivers/video/via/viafbdev.c
@@ -367,7 +367,7 @@ static int viafb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
} u;
u32 state_info = 0;
u32 *viafb_gamma_table;
- char driver_name[] = "viafb";
+ static const char driver_name[] = "viafb";
u32 __user *argp = (u32 __user *) arg;
u32 gpu32;
--
1.7.3.rc1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 21/25] drivers/video: Use static const char arrays
2010-09-13 19:47 ` [PATCH 21/25] drivers/video: Use static const char arrays Joe Perches
@ 2010-09-15 19:02 ` James Simmons
0 siblings, 0 replies; 2+ messages in thread
From: James Simmons @ 2010-09-15 19:02 UTC (permalink / raw)
To: Joe Perches
Cc: linux-kernel, Thomas Winischhofer, Joseph Chan,
Florian Tobias Schandinat, linux-fbdev
> Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: James Simmons <jsimmons@infradead.org>
> ---
> drivers/video/sh_mipi_dsi.c | 4 ++--
> drivers/video/sis/sis_main.c | 10 +++++-----
> drivers/video/via/viafbdev.c | 2 +-
> 3 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/video/sh_mipi_dsi.c b/drivers/video/sh_mipi_dsi.c
> index 5699ce0..4a8501b 100644
> --- a/drivers/video/sh_mipi_dsi.c
> +++ b/drivers/video/sh_mipi_dsi.c
> @@ -319,7 +319,7 @@ static int __init sh_mipi_probe(struct platform_device *pdev)
> struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> unsigned long rate, f_current;
> int idx = pdev->id, ret;
> - char dsip_clk[] = "dsi.p_clk";
> + char dsip_clk[sizeof("dsiXp_clk")];
>
> if (!res || idx >= ARRAY_SIZE(mipi_dsi) || !pdata)
> return -ENODEV;
> @@ -370,7 +370,7 @@ static int __init sh_mipi_probe(struct platform_device *pdev)
>
> dev_dbg(&pdev->dev, "DSI-T clk %lu -> %lu\n", f_current, rate);
>
> - sprintf(dsip_clk, "dsi%1.1dp_clk", idx);
> + sprintf(dsip_clk, "dsi%cp_clk", idx + '0');
> mipi->dsip_clk = clk_get(&pdev->dev, dsip_clk);
> if (IS_ERR(mipi->dsip_clk)) {
> ret = PTR_ERR(mipi->dsip_clk);
> diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c
> index 559bf17..4be65d1 100644
> --- a/drivers/video/sis/sis_main.c
> +++ b/drivers/video/sis/sis_main.c
> @@ -2387,8 +2387,8 @@ SiS_Sense30x(struct sis_video_info *ivideo)
> u16 cvbs=0, cvbs_c=0;
> u16 vga2=0, vga2_c=0;
> int myflag, result;
> - char stdstr[] = "sisfb: Detected";
> - char tvstr[] = "TV connected to";
> + static const char stdstr[] = "sisfb: Detected";
> + static const char tvstr[] = "TV connected to";
>
> if(ivideo->vbflags2 & VB2_301) {
> svhs = 0x00b9; cvbs = 0x00b3; vga2 = 0x00d1;
> @@ -2525,7 +2525,7 @@ SiS_SenseCh(struct sis_video_info *ivideo)
> {
> #if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315)
> u8 temp1, temp2;
> - char stdstr[] = "sisfb: Chrontel: Detected TV connected to";
> + static const char stdstr[] = "sisfb: Chrontel: Detected TV connected to";
> #endif
> #ifdef CONFIG_FB_SIS_300
> unsigned char test[3];
> @@ -2648,8 +2648,8 @@ SiS_SenseCh(struct sis_video_info *ivideo)
> static void __devinit
> sisfb_get_VB_type(struct sis_video_info *ivideo)
> {
> - char stdstr[] = "sisfb: Detected";
> - char bridgestr[] = "video bridge";
> + static const char stdstr[] = "sisfb: Detected";
> + static const char bridgestr[] = "video bridge";
> u8 vb_chipid;
> u8 reg;
>
> diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c
> index 5a947b0..394ef48 100644
> --- a/drivers/video/via/viafbdev.c
> +++ b/drivers/video/via/viafbdev.c
> @@ -367,7 +367,7 @@ static int viafb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
> } u;
> u32 state_info = 0;
> u32 *viafb_gamma_table;
> - char driver_name[] = "viafb";
> + static const char driver_name[] = "viafb";
>
> u32 __user *argp = (u32 __user *) arg;
> u32 gpu32;
> --
> 1.7.3.rc1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-15 19:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1284406638.git.joe@perches.com>
2010-09-13 19:47 ` [PATCH 21/25] drivers/video: Use static const char arrays Joe Perches
2010-09-15 19:02 ` James Simmons
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).