diff options
author | Arnd Bergmann <arnd@arndb.de> | 2011-07-21 16:31:22 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-07-21 16:31:22 +0200 |
commit | ab2a0e0d135490729e384c1826d118f92e88cae8 (patch) | |
tree | 58ab1e9e5d549feac9bf3beacbb6942f50d0bed9 /arch/arm/plat-samsung/dev-i2c1.c | |
parent | 09dd9b39abf85b8fae3ea105a81825478dd227b6 (diff) | |
parent | 2f3ab04a47c9b5e7c93400601e8f69bef0fa184a (diff) |
Merge branch 'next-samsung-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/cleanup
Diffstat (limited to 'arch/arm/plat-samsung/dev-i2c1.c')
-rw-r--r-- | arch/arm/plat-samsung/dev-i2c1.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/arch/arm/plat-samsung/dev-i2c1.c b/arch/arm/plat-samsung/dev-i2c1.c index 858ee2a0414c..3b7c7bec1cf9 100644 --- a/arch/arm/plat-samsung/dev-i2c1.c +++ b/arch/arm/plat-samsung/dev-i2c1.c @@ -44,26 +44,18 @@ struct platform_device s3c_device_i2c1 = { .resource = s3c_i2c_resource, }; -static struct s3c2410_platform_i2c default_i2c_data1 __initdata = { - .flags = 0, - .bus_num = 1, - .slave_addr = 0x10, - .frequency = 100*1000, - .sda_delay = 100, -}; - void __init s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *pd) { struct s3c2410_platform_i2c *npd; - if (!pd) - pd = &default_i2c_data1; + if (!pd) { + pd = &default_i2c_data; + pd->bus_num = 1; + } - 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; + npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c), + &s3c_device_i2c1); - s3c_device_i2c1.dev.platform_data = npd; + if (!npd->cfg_gpio) + npd->cfg_gpio = s3c_i2c1_cfg_gpio; } |