From e0c035541b47fdddaf79f0b3e2e1c8aceb8f84b6 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Fri, 28 Oct 2005 15:31:45 +0100 Subject: [PATCH] --- yaml --- r: 10446 b: refs/heads/master c: 893b03094c2ed929648d76a29cbbfc9e215e8636 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-s3c2410/devs.c | 16 ++++++++++------ trunk/arch/arm/mach-s3c2410/mach-h1940.c | 3 ++- trunk/include/asm-arm/arch-s3c2410/fb.h | 3 ++- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index a2506c37876c..d7a2383134d5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3b90c9c33361d49893645ffcebe6ca230f434705 +refs/heads/master: 893b03094c2ed929648d76a29cbbfc9e215e8636 diff --git a/trunk/arch/arm/mach-s3c2410/devs.c b/trunk/arch/arm/mach-s3c2410/devs.c index 8a37236b04ab..08bc7d95a45d 100644 --- a/trunk/arch/arm/mach-s3c2410/devs.c +++ b/trunk/arch/arm/mach-s3c2410/devs.c @@ -103,14 +103,18 @@ struct platform_device s3c_device_lcd = { EXPORT_SYMBOL(s3c_device_lcd); -static struct s3c2410fb_mach_info s3c2410fb_info; - -void __init set_s3c2410fb_info(struct s3c2410fb_mach_info *hard_s3c2410fb_info) +void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd) { - memcpy(&s3c2410fb_info,hard_s3c2410fb_info,sizeof(struct s3c2410fb_mach_info)); - s3c_device_lcd.dev.platform_data = &s3c2410fb_info; + struct s3c2410fb_mach_info *npd; + + npd = kmalloc(sizeof(*npd), GFP_KERNEL); + if (npd) { + memcpy(npd, pd, sizeof(*npd)); + s3c_device_lcd.dev.platform_data = npd; + } else { + printk(KERN_ERR "no memory for LCD platform data\n"); + } } -EXPORT_SYMBOL(set_s3c2410fb_info); /* NAND Controller */ diff --git a/trunk/arch/arm/mach-s3c2410/mach-h1940.c b/trunk/arch/arm/mach-s3c2410/mach-h1940.c index fb3cb01266e5..7efeaaad2361 100644 --- a/trunk/arch/arm/mach-s3c2410/mach-h1940.c +++ b/trunk/arch/arm/mach-s3c2410/mach-h1940.c @@ -25,6 +25,7 @@ * 14-Jan-2005 BJD Added clock init * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA * 20-Sep-2005 BJD Added static to non-exported items + * 26-Oct-2005 BJD Changed name of fb init call */ #include @@ -164,7 +165,7 @@ static void __init h1940_init_irq(void) static void __init h1940_init(void) { - set_s3c2410fb_info(&h1940_lcdcfg); + s3c24xx_fb_set_platdata(&h1940_lcdcfg); } MACHINE_START(H1940, "IPAQ-H1940") diff --git a/trunk/include/asm-arm/arch-s3c2410/fb.h b/trunk/include/asm-arm/arch-s3c2410/fb.h index ac57bc887d82..4790491ba9d0 100644 --- a/trunk/include/asm-arm/arch-s3c2410/fb.h +++ b/trunk/include/asm-arm/arch-s3c2410/fb.h @@ -13,6 +13,7 @@ * 07-Sep-2004 RTP Created file * 03-Nov-2004 BJD Updated and minor cleanups * 03-Aug-2005 RTP Renamed to fb.h + * 26-Oct-2005 BJD Changed name of platdata init */ #ifndef __ASM_ARM_FB_H @@ -64,6 +65,6 @@ struct s3c2410fb_mach_info { unsigned long lpcsel; }; -void __init set_s3c2410fb_info(struct s3c2410fb_mach_info *hard_s3c2410fb_info); +extern void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *); #endif /* __ASM_ARM_FB_H */