summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung/dev-i2c6.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-samsung/dev-i2c6.c')
-rw-r--r--arch/arm/plat-samsung/dev-i2c6.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/arm/plat-samsung/dev-i2c6.c b/arch/arm/plat-samsung/dev-i2c6.c
index 4083108908a8..cf539cc708cc 100644
--- a/arch/arm/plat-samsung/dev-i2c6.c
+++ b/arch/arm/plat-samsung/dev-i2c6.c
@@ -58,11 +58,9 @@ void __init s3c_i2c6_set_platdata(struct s3c2410_platform_i2c *pd)
if (!pd)
pd = &default_i2c_data6;
- 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_i2c6_cfg_gpio;
+ npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
+ &s3c_device_i2c6);
- s3c_device_i2c6.dev.platform_data = npd;
+ if (!npd->cfg_gpio)
+ npd->cfg_gpio = s3c_i2c6_cfg_gpio;
}