Samsung device updates
Subsystems (3)
Cleanups of the i2c device system, and helper code for setting platform data.
Note, not run-tested yet, only buildtested across all defconfigs
PATCH 1/9 ARM: SAMSUNG: Default s3c_device_i2c1
There are no current SoCs where i2c1 is anything other than an s3c2440-i2c implementation, so change the device's name to be s3c2440-i2c so we can go and eliminate the calls in the cpu-init which set the name.
--- arch/arm/plat-samsung/dev-i2c1.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/plat-samsung/dev-i2c1.c +2 -1
@@ -38,7 +38,8 @@ static struct resource s3c_i2c_resource[] = { };struct platform_device s3c_device_i2c1 = { - .name ="s3c2410-i2c" , +/* default to s3c2440-i2c as no SoC with >1 I2C is s3c2410 style */ + .name ="s3c2440-i2c" , .id =1 , .num_resources =ARRAY_SIZE (s3c_i2c_resource), .resource = s3c_i2c_resource,
Signature · 1 line
1.6.3.3
PATCH 2/9 ARM: SAMSUNG: Remove s3c_i2c1_setname() calls for s3c2440-i2c
In reply to Ben DooksNow we've defaulted the s3c_device_i2c1's name to s3c2440-i2c, remove all the s3c_i2c1_setname("s3c2440-i2c") as they are no longer needed.
--- arch/arm/mach-s3c2416/s3c2416.c | 1 - arch/arm/mach-s3c64xx/s3c6410.c | 1 - arch/arm/mach-s5pc100/cpu.c | 1 - arch/arm/mach-s5pv210/cpu.c | 1 - 4 files changed, 0 insertions(+), 4 deletions(-)
arch/arm/mach-s3c2416/s3c2416.c +0 -1
@@ -88,7 +88,6 @@ int __init s3c2416_init(void)/* the i2c devices are directly compatible with s3c2440 */ s3c_i2c0_setname ("s3c2440-i2c" ); -s3c_i2c1_setname ("s3c2440-i2c" ); s3c_device_fb.name ="s3c2443-fb" ;
arch/arm/mach-s3c64xx/s3c6410.c +0 -1
@@ -52,7 +52,6 @@ void __init s3c6410_map_io(void)/* the i2c devices are directly compatible with s3c2440 */ s3c_i2c0_setname ("s3c2440-i2c" ); -s3c_i2c1_setname ("s3c2440-i2c" ); s3c_device_adc.name ="s3c64xx-adc" ; s3c_device_nand.name ="s3c6400-nand" ;
arch/arm/mach-s5pc100/cpu.c +0 -1
@@ -89,7 +89,6 @@ void __init s5pc100_map_io(void)/* the i2c devices are directly compatible with s3c2440 */ s3c_i2c0_setname ("s3c2440-i2c" ); -s3c_i2c1_setname ("s3c2440-i2c" );s3c_onenand_setname ("s5pc100-onenand" ); }
arch/arm/mach-s5pv210/cpu.c +0 -1
@@ -89,7 +89,6 @@ void __init s5pv210_map_io(void)/* the i2c devices are directly compatible with s3c2440 */ s3c_i2c0_setname ("s3c2440-i2c" ); -s3c_i2c1_setname ("s3c2440-i2c" );s3c_i2c2_setname ("s3c2440-i2c" ); }
Signature · 1 line
1.6.3.3
PATCH 3/9 ARM: SAMSUNG: Default s3c_device_i2c2 to s3c2440-i2c
In reply to Ben DooksThere are no current SoCs where i2c2 is anything other than a s3c2440-i2c implementation (see also e4c5cb3796155eb4f15f7f0b1b7ea705f87743a7) so change the device's name to s3c2440-i2c by default so we can eliminate the calls that set the name.
Also remove the singler user of this, the s5pv210.
--- arch/arm/mach-s5pv210/cpu.c | 1 - arch/arm/plat-samsung/dev-i2c2.c | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-s5pv210/cpu.c +0 -1
@@ -89,7 +89,6 @@ void __init s5pv210_map_io(void)/* the i2c devices are directly compatible with s3c2440 */ s3c_i2c0_setname ("s3c2440-i2c" ); -s3c_i2c2_setname ("s3c2440-i2c" ); }void __init s5pv210_init_clocks (int xtal)
arch/arm/plat-samsung/dev-i2c2.c +2 -1
@@ -39,7 +39,8 @@ static struct resource s3c_i2c_resource[] = { };struct platform_device s3c_device_i2c2 = { - .name ="s3c2410-i2c" , +/* default to s3c2440-i2c as no SoC with >1 I2C is s3c2410 style */ + .name ="s3c2440-i2c" , .id =2 , .num_resources =ARRAY_SIZE (s3c_i2c_resource), .resource = s3c_i2c_resource,
Signature · 1 line
1.6.3.3
PATCH 4/9 ARM: SAMSUNG: Default s3c_device_i2c0 to s3c2440-i2c
In reply to Ben DooksThe bulk of the SoCs implement the s3c2440-i2c variant of this block, so change the default name to s3c2440-i2c and rename the cases where it is s3c2410.
--- arch/arm/mach-s3c2410/s3c2410.c | 3 +++ arch/arm/mach-s3c2412/s3c2412.c | 3 +++ arch/arm/plat-samsung/dev-i2c0.c | 3 ++- 3 files changed, 8 insertions(+), 1 deletions(-)
arch/arm/mach-s3c2410/s3c2410.c +3 -0
@@ -40,6 +40,7 @@#include <plat/devs.h> #include <plat/clock.h> #include <plat/pll.h> +#include <plat/iic-core.h> #include <plat/gpio-core.h> #include <plat/gpio-cfg.h>
@@ -70,6 +71,8 @@ void __init s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no)void __init s3c2410_map_io (void ) { +s3c_i2c0_setname ("s3c2410-i2c" ); + s3c24xx_gpiocfg_default.set_pull = s3c_gpio_setpull_1up; s3c24xx_gpiocfg_default.get_pull = s3c_gpio_getpull_1up;
arch/arm/mach-s3c2412/s3c2412.c +3 -0
@@ -46,6 +46,7 @@#include <mach/regs-s3c2412.h> #include <plat/s3c2412.h> +#include <plat/iic-core.h> #include <plat/cpu.h> #include <plat/devs.h> #include <plat/clock.h>
@@ -94,6 +95,8 @@ void __init s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no) s3c_device_lcd.name ="s3c2412-lcd" ; s3c_device_nand.name ="s3c2412-nand" ; +s3c_i2c0_setname ("s3c2410-i2c" ); +/* alter IRQ of SDI controller */ s3c_device_sdi.resource[1 ].start =IRQ_S3C2412_SDI ;
arch/arm/plat-samsung/dev-i2c0.c +2 -1
@@ -38,7 +38,8 @@ static struct resource s3c_i2c_resource[] = { };struct platform_device s3c_device_i2c0 = { - .name ="s3c2410-i2c" , +/* default to s3c2440-i2c, most common implementation */ + .name ="s3c2440-i2c" , #ifdef CONFIG_S3C_DEV_I2C1 .id =0 , #else
Signature · 1 line
1.6.3.3
PATCH 5/9 ARM: SAMSUNG: Eliminate s3c2440-i2c renames
In reply to Ben DooksCommit 0445af6624016110d1b448e0089261548ba29ee3 set the default name to s3c2440-i2c, so we no longer need to do anything about renaming it. Remove all the call sites and the header that was included to get it.
--- arch/arm/mach-s3c2412/s3c2412.c | 2 +- arch/arm/mach-s3c2416/s3c2416.c | 5 ----- arch/arm/mach-s3c64xx/s3c6400.c | 4 ---- arch/arm/mach-s3c64xx/s3c6410.c | 4 ---- arch/arm/mach-s5pc100/cpu.c | 4 ---- arch/arm/mach-s5pv210/cpu.c | 4 ---- 6 files changed, 1 insertions(+), 22 deletions(-)
arch/arm/mach-s3c2412/s3c2412.c +1 -1
@@ -46,9 +46,9 @@#include <mach/regs-s3c2412.h> #include <plat/s3c2412.h> -#include <plat/iic-core.h> #include <plat/cpu.h> #include <plat/devs.h> +#include <plat/iic-core.h> #include <plat/clock.h> #include <plat/pm.h> #include <plat/pll.h>
arch/arm/mach-s3c2416/s3c2416.c +0 -5
@@ -54,8 +54,6 @@#include <plat/devs.h> #include <plat/cpu.h> -#include <plat/iic-core.h> -static struct map_desc s3c2416_iodesc[]__initdata = {IODESC_ENT (WATCHDOG ),IODESC_ENT (CLKPWR ),
@@ -86,9 +84,6 @@ int __init s3c2416_init(void) s3c_device_wdt.resource[1 ].start =IRQ_S3C2443_WDT ; s3c_device_wdt.resource[1 ].end =IRQ_S3C2443_WDT ; -/* the i2c devices are directly compatible with s3c2440 */ -s3c_i2c0_setname ("s3c2440-i2c" ); - s3c_device_fb.name ="s3c2443-fb" ;return sysdev_register (&s3c2416_sysdev);
arch/arm/mach-s3c64xx/s3c6400.c +0 -4
@@ -36,7 +36,6 @@#include <plat/devs.h> #include <plat/clock.h> #include <plat/sdhci.h> -#include <plat/iic-core.h> #include <plat/onenand-core.h> #include <mach/s3c6400.h>
@@ -48,9 +47,6 @@ void __init s3c6400_map_io(void)s3c6400_default_sdhci1 ();s3c6400_default_sdhci2 (); -/* the i2c devices are directly compatible with s3c2440 */ -s3c_i2c0_setname ("s3c2440-i2c" ); - s3c_device_nand.name ="s3c6400-nand" ;s3c_onenand_setname ("s3c6400-onenand" );
arch/arm/mach-s3c64xx/s3c6410.c +0 -4
@@ -37,7 +37,6 @@#include <plat/devs.h> #include <plat/clock.h> #include <plat/sdhci.h> -#include <plat/iic-core.h> #include <plat/adc.h> #include <plat/onenand-core.h> #include <mach/s3c6400.h>
@@ -50,9 +49,6 @@ void __init s3c6410_map_io(void)s3c6410_default_sdhci1 ();s3c6410_default_sdhci2 (); -/* the i2c devices are directly compatible with s3c2440 */ -s3c_i2c0_setname ("s3c2440-i2c" ); - s3c_device_adc.name ="s3c64xx-adc" ; s3c_device_nand.name ="s3c6400-nand" ;s3c_onenand_setname ("s3c6410-onenand" );
arch/arm/mach-s5pc100/cpu.c +0 -4
@@ -38,7 +38,6 @@#include <plat/cpu.h> #include <plat/devs.h> #include <plat/clock.h> -#include <plat/iic-core.h> #include <plat/sdhci.h> #include <plat/onenand-core.h>
@@ -87,9 +86,6 @@ void __init s5pc100_map_io(void)s5pc100_default_sdhci1 ();s5pc100_default_sdhci2 (); -/* the i2c devices are directly compatible with s3c2440 */ -s3c_i2c0_setname ("s3c2440-i2c" ); -s3c_onenand_setname ("s5pc100-onenand" ); }
arch/arm/mach-s5pv210/cpu.c +0 -4
@@ -32,7 +32,6 @@#include <plat/devs.h> #include <plat/clock.h> #include <plat/s5pv210.h> -#include <plat/iic-core.h> #include <plat/sdhci.h> /* Initial IO mappings */
@@ -86,9 +85,6 @@ void __init s5pv210_map_io(void)s5pv210_default_sdhci0 ();s5pv210_default_sdhci1 ();s5pv210_default_sdhci2 (); - -/* the i2c devices are directly compatible with s3c2440 */ -s3c_i2c0_setname ("s3c2440-i2c" ); }void __init s5pv210_init_clocks (int xtal)
Signature · 1 line
1.6.3.3
PATCH 6/9 ARM: SAMSUNG: Add helper to clone and set platform data
In reply to Ben DooksAdd a helper to clone the platform data via kmemdup() and set it into the specified device and report any problems via printk().
This is intended to replace a number of sites in the Samsung kernel where the same thing is being repeated in specific platform setting code. See next patches for replacements.
--- arch/arm/plat-samsung/Makefile | 2 + arch/arm/plat-samsung/include/plat/devs.h | 12 +++++++++ arch/arm/plat-samsung/platformdata.c | 37 +++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 0 deletions(-) create mode 100644 arch/arm/plat-samsung/platformdata.c
arch/arm/plat-samsung/Makefile +2 -0
@@ -30,6 +30,8 @@ obj-$(CONFIG_S3C_ADC) += adc.o # devices +obj-y += platformdata.o + obj-$(CONFIG_S3C_DEV_HSMMC) += dev-hsmmc.o obj-$(CONFIG_S3C_DEV_HSMMC1) += dev-hsmmc1.o obj-$(CONFIG_S3C_DEV_HSMMC2) += dev-hsmmc2.o
arch/arm/plat-samsung/include/plat/devs.h +12 -0
@@ -108,3 +108,15 @@ extern struct platform_device s3c_device_camif;extern struct platform_device s3c_device_ac97;#endif + +/** +* s3c_set_platdata() - helper for setting platform data +* @pd: The default platform data for this device. +* @pdsize: The size of the platform data. +* @pdev: Pointer to the device to fill in. +* +* This helper replaces a number of calls that copy and then set the +* platform data of the device. +*/ +extern void *s3c_set_platdata (void *pd,size_t pdsize, +struct platform_device *pdev);
arch/arm/plat-samsung/platformdata.c new file +37 -0
@@ -0,0 +1,37 @@ +/* linux/arch/arm/plat-samsung/platformdata.c +* +* Copyright 2010 Ben Dooks <[email protected]> +* +* Helper for platform data setting +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#include <linux/kernel.h> +#include <linux/string.h> +#include <linux/platform_device.h> + +#include <plat/devs.h> + +void __init *s3c_set_platdata (void *pd,size_t pdsize, +struct platform_device *pdev) +{ +void *npd; + +if (!pd) { +/* too early to use dev_name(), may not be registered */ +printk (KERN_ERR "%s: no platform data supplied\n" , pdev->name); +return NULL ; + } + + npd =kmemdup (pd, pdsize,GFP_KERNEL ); +if (!npd) { +printk (KERN_ERR "%s: cannot clone platform data\n" , pdev->name); +return NULL ; + } + + pdev->dev.platform_data = npd; +return npd; +}
Signature · 1 line
1.6.3.3
PATCH 7/9 ARM: SAMSUNG: Use s3c_set_platdata() helper
In reply to Ben DooksCommit f8b5ea089d5a447a8933a6540ceeccbcb78f9e53 added a helper to copy and set platform data, so let's replace the various sites in the Samsung support where this is happening.
--- arch/arm/plat-samsung/dev-fb.c | 13 +------------ arch/arm/plat-samsung/dev-hwmon.c | 13 +------------ arch/arm/plat-samsung/dev-i2c0.c | 12 ++++-------- arch/arm/plat-samsung/dev-i2c1.c | 12 ++++-------- arch/arm/plat-samsung/dev-onenand.c | 8 ++------ arch/arm/plat-samsung/dev-ts.c | 14 ++------------ arch/arm/plat-samsung/dev-usb.c | 12 +++--------- 7 files changed, 17 insertions(+), 67 deletions(-)
arch/arm/plat-samsung/dev-fb.c +1 -12
@@ -58,16 +58,5 @@ struct platform_device s3c_device_fb = {void __init s3c_fb_set_platdata (struct s3c_fb_platdata *pd) { -struct s3c_fb_platdata *npd; - -if (!pd) { -printk (KERN_ERR "%s: no platform data\n" , __func__); -return ; - } - - npd =kmemdup (pd,sizeof (struct s3c_fb_platdata ),GFP_KERNEL ); -if (!npd) -printk (KERN_ERR "%s: no memory for platform data\n" , __func__); - - s3c_device_fb.dev.platform_data = npd; +s3c_set_platdata (pd,sizeof (struct s3c_fb_platdata ), &s3c_device_fb); }
arch/arm/plat-samsung/dev-hwmon.c +1 -12
@@ -27,16 +27,5 @@ struct platform_device s3c_device_hwmon = {void __init s3c_hwmon_set_platdata (struct s3c_hwmon_pdata *pd) { -struct s3c_hwmon_pdata *npd; - -if (!pd) { -printk (KERN_ERR "%s: no platform data\n" , __func__); -return ; - } - - npd =kmemdup (pd,sizeof (struct s3c_hwmon_pdata ),GFP_KERNEL ); -if (!npd) -printk (KERN_ERR "%s: no memory for platform data\n" , __func__); - - s3c_device_hwmon.dev.platform_data = npd; +s3c_set_platdata (pd,sizeof (struct s3c_hwmon_pdata ), &s3c_device_hwmon); }
arch/arm/plat-samsung/dev-i2c0.c +4 -8
@@ -58,16 +58,12 @@ static struct s3c2410_platform_i2c default_i2c_data0 __initdata = {void __init s3c_i2c0_set_platdata (struct s3c2410_platform_i2c *pd) { -struct s3c2410_platform_i2c *npd; -if (!pd) pd = &default_i2c_data0; - npd =kmemdup (pd,sizeof (struct s3c2410_platform_i2c ),GFP_KERNEL ); -if (!npd) -printk (KERN_ERR "%s: no memory for platform data\n" , __func__); -else if (!npd->cfg_gpio) - npd->cfg_gpio = s3c_i2c0_cfg_gpio; +if (!pd->cfg_gpio) + pd->cfg_gpio = s3c_i2c0_cfg_gpio; - s3c_device_i2c0.dev.platform_data = npd; +s3c_set_platdata (pd,sizeof (struct s3c2410_platform_i2c ), + &s3c_device_i2c0); }
arch/arm/plat-samsung/dev-i2c1.c +4 -8
@@ -55,16 +55,12 @@ static struct s3c2410_platform_i2c default_i2c_data1 __initdata = {void __init s3c_i2c1_set_platdata (struct s3c2410_platform_i2c *pd) { -struct s3c2410_platform_i2c *npd; -if (!pd) pd = &default_i2c_data1; - npd =kmemdup (pd,sizeof (struct s3c2410_platform_i2c ),GFP_KERNEL ); -if (!npd) -printk (KERN_ERR "%s: no memory for platform data\n" , __func__); -else if (!npd->cfg_gpio) - npd->cfg_gpio = s3c_i2c1_cfg_gpio; +if (!pd->cfg_gpio) + pd->cfg_gpio = s3c_i2c1_cfg_gpio; - s3c_device_i2c1.dev.platform_data = npd; +s3c_set_platdata (pd,sizeof (struct s3c2410_platform_i2c ), + &s3c_device_i2c1); }
arch/arm/plat-samsung/dev-onenand.c +2 -6
@@ -46,10 +46,6 @@ struct platform_device s3c_device_onenand = {void s3c_onenand_set_platdata (struct onenand_platform_data *pdata) { -struct onenand_platform_data *pd; - - pd =kmemdup (pdata,sizeof (struct onenand_platform_data ),GFP_KERNEL ); -if (!pd) -printk (KERN_ERR "%s: no memory for platform data\n" , __func__); - s3c_device_onenand.dev.platform_data = pd; +s3c_set_platdata (pdata,sizeof (struct onenand_platform_data ), + &s3c_device_onenand); }
arch/arm/plat-samsung/dev-ts.c +2 -12
@@ -45,17 +45,7 @@ struct platform_device s3c_device_ts = {void __init s3c24xx_ts_set_platdata (struct s3c2410_ts_mach_info *pd) { -struct s3c2410_ts_mach_info *npd; - -if (!pd) { -printk (KERN_ERR "%s: no platform data\n" , __func__); -return ; - } - - npd =kmemdup (pd,sizeof (struct s3c2410_ts_mach_info ),GFP_KERNEL ); -if (!npd) -printk (KERN_ERR "%s: no memory for platform data\n" , __func__); - - s3c_device_ts.dev.platform_data = npd; +s3c_set_platdata (pd,sizeof (struct s3c2410_ts_mach_info ), + &s3c_device_ts); }EXPORT_SYMBOL (s3c24xx_ts_set_platdata);
arch/arm/plat-samsung/dev-usb.c +3 -9
@@ -52,19 +52,13 @@ EXPORT_SYMBOL(s3c_device_ohci);/** * s3c_ohci_set_platdata - initialise OHCI device platform data -* @info: The platform data. +* @pd: The platform data. * * This call copies the @info passed in and sets the device .platform_data * field to that copy. The @info is copied so that the original can be marked * __initdata. */ -void __init s3c_ohci_set_platdata (struct s3c2410_hcd_info *info) +void __init s3c_ohci_set_platdata (struct s3c2410_hcd_info *pd) { -struct s3c2410_hcd_info *npd; - - npd =kmemdup (info,sizeof (struct s3c2410_hcd_info ),GFP_KERNEL ); -if (!npd) -printk (KERN_ERR "%s: no memory for platform data\n" , __func__); - - s3c_device_ohci.dev.platform_data = npd; +s3c_set_platdata (pd,sizeof (struct s3c2410_hcd_info ), &s3c_device_ohci); }
Signature · 1 line
1.6.3.3
PATCH 8/9 ARM: S3C24XX: Use s3c_set_platdata() helper
In reply to Ben DooksCommit f8b5ea089d5a447a8933a6540ceeccbcb78f9e53 added a helper to copy and set platform data, so let's replace the various sites in the Samsung support where this is happening.
--- arch/arm/plat-s3c24xx/devs.c | 23 ++++------------------- 1 files changed, 4 insertions(+), 19 deletions(-)
arch/arm/plat-s3c24xx/devs.c +4 -19
@@ -149,9 +149,8 @@ void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd) {struct s3c2410fb_mach_info *npd; - npd =kmemdup (pd,sizeof (*npd),GFP_KERNEL ); + npd =s3c_set_platdata (pd,sizeof (*npd), &s3c_device_lcd);if (npd) { - s3c_device_lcd.dev.platform_data = npd; npd->displays =kmemdup (pd->displays,sizeof (struct s3c2410fb_display ) * npd->num_displays,GFP_KERNEL );
@@ -223,15 +222,7 @@ EXPORT_SYMBOL(s3c_device_usbgadget);void __init s3c24xx_udc_set_platdata (struct s3c2410_udc_mach_info *pd) { -struct s3c2410_udc_mach_info *npd; - - npd =kmalloc (sizeof (*npd),GFP_KERNEL ); -if (npd) { -memcpy (npd, pd,sizeof (*npd)); - s3c_device_usbgadget.dev.platform_data = npd; - }else { -printk (KERN_ERR "no memory for udc platform data\n" ); - } +s3c_set_platdata (pd,sizeof (*pd), &s3c_device_usbgadget); }/* IIS */
@@ -341,15 +332,9 @@ struct platform_device s3c_device_sdi = {EXPORT_SYMBOL (s3c_device_sdi); -void __init s3c24xx_mci_set_platdata (struct s3c24xx_mci_pdata *pdata) +void __init s3c24xx_mci_set_platdata (struct s3c24xx_mci_pdata *pd) { -struct s3c24xx_mci_pdata *npd; - - npd =kmemdup (pdata,sizeof (struct s3c24xx_mci_pdata ),GFP_KERNEL ); -if (!npd) -printk (KERN_ERR "%s: no memory to copy pdata" , __func__); - - s3c_device_sdi.dev.platform_data = npd; +s3c_set_platdata (pd,sizeof (struct s3c24xx_mci_pdata ), &s3c_device_sdi); }
Signature · 1 line
1.6.3.3
PATCH 9/9 ARM: S3C64XX: Use s3c_set_platdata() helper
In reply to Ben DooksCommit f8b5ea089d5a447a8933a6540ceeccbcb78f9e53 added a helper to copy and set platform data, so let's replace the various sites in the Samsung support where this is happening.
--- arch/arm/mach-s3c64xx/dev-onenand1.c | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-)
arch/arm/mach-s3c64xx/dev-onenand1.c +2 -6
@@ -46,10 +46,6 @@ struct platform_device s3c64xx_device_onenand1 = {void s3c64xx_onenand1_set_platdata (struct onenand_platform_data *pdata) { -struct onenand_platform_data *pd; - - pd =kmemdup (pdata,sizeof (struct onenand_platform_data ),GFP_KERNEL ); -if (!pd) -printk (KERN_ERR "%s: no memory for platform data\n" , __func__); - s3c64xx_device_onenand1.dev.platform_data = pd; +s3c_set_platdata (pd,sizeof (struct onenand_platform_data ), + &s3c64xx_device_onenand1); }
Signature · 1 line
1.6.3.3