aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2005-10-28 10:31:45 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-10-28 10:31:45 -0400
commit893b03094c2ed929648d76a29cbbfc9e215e8636 (patch)
treeaff67b68cf24ac83316514051568f3643a48ebc6
parent3b90c9c33361d49893645ffcebe6ca230f434705 (diff)
[ARM] 3045/2: S3C2410 - change init for lcd platform data
Patch from Ben Dooks Change set_s3c2410fb_info to s3c2410_fb_set_platdata and use kmalloc() for the copy of the information it is passed. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/mach-s3c2410/devs.c16
-rw-r--r--arch/arm/mach-s3c2410/mach-h1940.c3
-rw-r--r--include/asm-arm/arch-s3c2410/fb.h3
3 files changed, 14 insertions, 8 deletions
diff --git a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.c
index 8a37236b04ab..08bc7d95a45d 100644
--- a/arch/arm/mach-s3c2410/devs.c
+++ b/arch/arm/mach-s3c2410/devs.c
@@ -103,14 +103,18 @@ struct platform_device s3c_device_lcd = {
103 103
104EXPORT_SYMBOL(s3c_device_lcd); 104EXPORT_SYMBOL(s3c_device_lcd);
105 105
106static struct s3c2410fb_mach_info s3c2410fb_info; 106void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd)
107
108void __init set_s3c2410fb_info(struct s3c2410fb_mach_info *hard_s3c2410fb_info)
109{ 107{
110 memcpy(&s3c2410fb_info,hard_s3c2410fb_info,sizeof(struct s3c2410fb_mach_info)); 108 struct s3c2410fb_mach_info *npd;
111 s3c_device_lcd.dev.platform_data = &s3c2410fb_info; 109
110 npd = kmalloc(sizeof(*npd), GFP_KERNEL);
111 if (npd) {
112 memcpy(npd, pd, sizeof(*npd));
113 s3c_device_lcd.dev.platform_data = npd;
114 } else {
115 printk(KERN_ERR "no memory for LCD platform data\n");
116 }
112} 117}
113EXPORT_SYMBOL(set_s3c2410fb_info);
114 118
115/* NAND Controller */ 119/* NAND Controller */
116 120
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c
index fb3cb01266e5..7efeaaad2361 100644
--- a/arch/arm/mach-s3c2410/mach-h1940.c
+++ b/arch/arm/mach-s3c2410/mach-h1940.c
@@ -25,6 +25,7 @@
25 * 14-Jan-2005 BJD Added clock init 25 * 14-Jan-2005 BJD Added clock init
26 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA 26 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
27 * 20-Sep-2005 BJD Added static to non-exported items 27 * 20-Sep-2005 BJD Added static to non-exported items
28 * 26-Oct-2005 BJD Changed name of fb init call
28*/ 29*/
29 30
30#include <linux/kernel.h> 31#include <linux/kernel.h>
@@ -164,7 +165,7 @@ static void __init h1940_init_irq(void)
164 165
165static void __init h1940_init(void) 166static void __init h1940_init(void)
166{ 167{
167 set_s3c2410fb_info(&h1940_lcdcfg); 168 s3c24xx_fb_set_platdata(&h1940_lcdcfg);
168} 169}
169 170
170MACHINE_START(H1940, "IPAQ-H1940") 171MACHINE_START(H1940, "IPAQ-H1940")
diff --git a/include/asm-arm/arch-s3c2410/fb.h b/include/asm-arm/arch-s3c2410/fb.h
index ac57bc887d82..4790491ba9d0 100644
--- a/include/asm-arm/arch-s3c2410/fb.h
+++ b/include/asm-arm/arch-s3c2410/fb.h
@@ -13,6 +13,7 @@
13 * 07-Sep-2004 RTP Created file 13 * 07-Sep-2004 RTP Created file
14 * 03-Nov-2004 BJD Updated and minor cleanups 14 * 03-Nov-2004 BJD Updated and minor cleanups
15 * 03-Aug-2005 RTP Renamed to fb.h 15 * 03-Aug-2005 RTP Renamed to fb.h
16 * 26-Oct-2005 BJD Changed name of platdata init
16*/ 17*/
17 18
18#ifndef __ASM_ARM_FB_H 19#ifndef __ASM_ARM_FB_H
@@ -64,6 +65,6 @@ struct s3c2410fb_mach_info {
64 unsigned long lpcsel; 65 unsigned long lpcsel;
65}; 66};
66 67
67void __init set_s3c2410fb_info(struct s3c2410fb_mach_info *hard_s3c2410fb_info); 68extern void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *);
68 69
69#endif /* __ASM_ARM_FB_H */ 70#endif /* __ASM_ARM_FB_H */