aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s3c24xx/devs.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-s3c24xx/devs.c')
-rw-r--r--arch/arm/plat-s3c24xx/devs.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c
index 9265f09bfa5..58583732b29 100644
--- a/arch/arm/plat-s3c24xx/devs.c
+++ b/arch/arm/plat-s3c24xx/devs.c
@@ -21,6 +21,7 @@
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/slab.h> 23#include <linux/slab.h>
24#include <linux/string.h>
24 25
25#include <asm/mach/arch.h> 26#include <asm/mach/arch.h>
26#include <asm/mach/map.h> 27#include <asm/mach/map.h>
@@ -38,8 +39,7 @@
38#include <plat/devs.h> 39#include <plat/devs.h>
39#include <plat/cpu.h> 40#include <plat/cpu.h>
40#include <plat/regs-spi.h> 41#include <plat/regs-spi.h>
41 42#include <plat/ts.h>
42#include <mach/ts.h>
43 43
44/* Serial port registrations */ 44/* Serial port registrations */
45 45
@@ -149,10 +149,14 @@ void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd)
149{ 149{
150 struct s3c2410fb_mach_info *npd; 150 struct s3c2410fb_mach_info *npd;
151 151
152 npd = kmalloc(sizeof(*npd), GFP_KERNEL); 152 npd = kmemdup(pd, sizeof(*npd), GFP_KERNEL);
153 if (npd) { 153 if (npd) {
154 memcpy(npd, pd, sizeof(*npd));
155 s3c_device_lcd.dev.platform_data = npd; 154 s3c_device_lcd.dev.platform_data = npd;
155 npd->displays = kmemdup(pd->displays,
156 sizeof(struct s3c2410fb_display) * npd->num_displays,
157 GFP_KERNEL);
158 if (!npd->displays)
159 printk(KERN_ERR "no memory for LCD display data\n");
156 } else { 160 } else {
157 printk(KERN_ERR "no memory for LCD platform data\n"); 161 printk(KERN_ERR "no memory for LCD platform data\n");
158 } 162 }
@@ -338,14 +342,6 @@ struct platform_device s3c_device_adc = {
338 .resource = s3c_adc_resource, 342 .resource = s3c_adc_resource,
339}; 343};
340 344
341/* HWMON */
342
343struct platform_device s3c_device_hwmon = {
344 .name = "s3c-hwmon",
345 .id = -1,
346 .dev.parent = &s3c_device_adc.dev,
347};
348
349/* SDI */ 345/* SDI */
350 346
351static struct resource s3c_sdi_resource[] = { 347static struct resource s3c_sdi_resource[] = {
@@ -371,7 +367,7 @@ struct platform_device s3c_device_sdi = {
371 367
372EXPORT_SYMBOL(s3c_device_sdi); 368EXPORT_SYMBOL(s3c_device_sdi);
373 369
374void s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata) 370void __init s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata)
375{ 371{
376 struct s3c24xx_mci_pdata *npd; 372 struct s3c24xx_mci_pdata *npd;
377 373