Commit 2c2e2c27 authored by Naveen Krishna Chatradhi's avatar Naveen Krishna Chatradhi Committed by Kukjin Kim

ARM: SAMSUNG: Use generic set_plat_data function

Calls the generic s3c_set_platdata function instead.
Signed-off-by: default avatarNaveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: default avatarKukjin Kim <kgene.kim@samsung.com>
parent cf2e9c7b
...@@ -62,11 +62,9 @@ void __init s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *pd) ...@@ -62,11 +62,9 @@ void __init s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *pd)
if (!pd) if (!pd)
pd = &default_i2c_data0; pd = &default_i2c_data0;
npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL); npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
if (!npd) &s3c_device_i2c0);
printk(KERN_ERR "%s: no memory for platform data\n", __func__);
else if (!npd->cfg_gpio)
npd->cfg_gpio = s3c_i2c0_cfg_gpio;
s3c_device_i2c0.dev.platform_data = npd; if (!npd->cfg_gpio)
npd->cfg_gpio = s3c_i2c0_cfg_gpio;
} }
...@@ -59,11 +59,9 @@ void __init s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *pd) ...@@ -59,11 +59,9 @@ void __init s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *pd)
if (!pd) if (!pd)
pd = &default_i2c_data1; pd = &default_i2c_data1;
npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL); npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
if (!npd) &s3c_device_i2c1);
printk(KERN_ERR "%s: no memory for platform data\n", __func__);
else if (!npd->cfg_gpio)
npd->cfg_gpio = s3c_i2c1_cfg_gpio;
s3c_device_i2c1.dev.platform_data = npd; if (!npd->cfg_gpio)
npd->cfg_gpio = s3c_i2c1_cfg_gpio;
} }
...@@ -60,11 +60,9 @@ void __init s3c_i2c2_set_platdata(struct s3c2410_platform_i2c *pd) ...@@ -60,11 +60,9 @@ void __init s3c_i2c2_set_platdata(struct s3c2410_platform_i2c *pd)
if (!pd) if (!pd)
pd = &default_i2c_data2; pd = &default_i2c_data2;
npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL); npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
if (!npd) &s3c_device_i2c2);
printk(KERN_ERR "%s: no memory for platform data\n", __func__);
else if (!npd->cfg_gpio)
npd->cfg_gpio = s3c_i2c2_cfg_gpio;
s3c_device_i2c2.dev.platform_data = npd; if (!npd->cfg_gpio)
npd->cfg_gpio = s3c_i2c2_cfg_gpio;
} }
...@@ -58,11 +58,9 @@ void __init s3c_i2c3_set_platdata(struct s3c2410_platform_i2c *pd) ...@@ -58,11 +58,9 @@ void __init s3c_i2c3_set_platdata(struct s3c2410_platform_i2c *pd)
if (!pd) if (!pd)
pd = &default_i2c_data3; pd = &default_i2c_data3;
npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL); npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
if (!npd) &s3c_device_i2c3);
printk(KERN_ERR "%s: no memory for platform data\n", __func__);
else if (!npd->cfg_gpio)
npd->cfg_gpio = s3c_i2c3_cfg_gpio;
s3c_device_i2c3.dev.platform_data = npd; if (!npd->cfg_gpio)
npd->cfg_gpio = s3c_i2c3_cfg_gpio;
} }
...@@ -58,11 +58,9 @@ void __init s3c_i2c4_set_platdata(struct s3c2410_platform_i2c *pd) ...@@ -58,11 +58,9 @@ void __init s3c_i2c4_set_platdata(struct s3c2410_platform_i2c *pd)
if (!pd) if (!pd)
pd = &default_i2c_data4; pd = &default_i2c_data4;
npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL); npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
if (!npd) &s3c_device_i2c4);
printk(KERN_ERR "%s: no memory for platform data\n", __func__);
else if (!npd->cfg_gpio)
npd->cfg_gpio = s3c_i2c4_cfg_gpio;
s3c_device_i2c4.dev.platform_data = npd; if (!npd->cfg_gpio)
npd->cfg_gpio = s3c_i2c4_cfg_gpio;
} }
...@@ -58,11 +58,9 @@ void __init s3c_i2c5_set_platdata(struct s3c2410_platform_i2c *pd) ...@@ -58,11 +58,9 @@ void __init s3c_i2c5_set_platdata(struct s3c2410_platform_i2c *pd)
if (!pd) if (!pd)
pd = &default_i2c_data5; pd = &default_i2c_data5;
npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL); npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
if (!npd) &s3c_device_i2c5);
printk(KERN_ERR "%s: no memory for platform data\n", __func__);
else if (!npd->cfg_gpio)
npd->cfg_gpio = s3c_i2c5_cfg_gpio;
s3c_device_i2c5.dev.platform_data = npd; if (!npd->cfg_gpio)
npd->cfg_gpio = s3c_i2c5_cfg_gpio;
} }
...@@ -58,11 +58,9 @@ void __init s3c_i2c6_set_platdata(struct s3c2410_platform_i2c *pd) ...@@ -58,11 +58,9 @@ void __init s3c_i2c6_set_platdata(struct s3c2410_platform_i2c *pd)
if (!pd) if (!pd)
pd = &default_i2c_data6; pd = &default_i2c_data6;
npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL); npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
if (!npd) &s3c_device_i2c6);
printk(KERN_ERR "%s: no memory for platform data\n", __func__);
else if (!npd->cfg_gpio)
npd->cfg_gpio = s3c_i2c6_cfg_gpio;
s3c_device_i2c6.dev.platform_data = npd; if (!npd->cfg_gpio)
npd->cfg_gpio = s3c_i2c6_cfg_gpio;
} }
...@@ -58,11 +58,9 @@ void __init s3c_i2c7_set_platdata(struct s3c2410_platform_i2c *pd) ...@@ -58,11 +58,9 @@ void __init s3c_i2c7_set_platdata(struct s3c2410_platform_i2c *pd)
if (!pd) if (!pd)
pd = &default_i2c_data7; pd = &default_i2c_data7;
npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL); npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
if (!npd) &s3c_device_i2c7);
printk(KERN_ERR "%s: no memory for platform data\n", __func__);
else if (!npd->cfg_gpio)
npd->cfg_gpio = s3c_i2c7_cfg_gpio;
s3c_device_i2c7.dev.platform_data = npd; if (!npd->cfg_gpio)
npd->cfg_gpio = s3c_i2c7_cfg_gpio;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment