diff options
author | Arnd Bergmann <arnd@arndb.de> | 2011-07-28 11:25:46 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-07-28 11:25:46 -0400 |
commit | 6124a4e430b64d1577438c8648c59e996d02e73e (patch) | |
tree | 49cfafad785d1c9e403a5b0d755298b9af2c260f /arch/arm/plat-samsung/dev-i2c6.c | |
parent | 8e267f3da5f117d2f1316cf6ddf740f93f1c73aa (diff) | |
parent | 580975d7f48d7d047e22bb0f42adf7557801d8d4 (diff) |
Merge branch 'imx/dt' into next/dt
Diffstat (limited to 'arch/arm/plat-samsung/dev-i2c6.c')
-rw-r--r-- | arch/arm/plat-samsung/dev-i2c6.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/arch/arm/plat-samsung/dev-i2c6.c b/arch/arm/plat-samsung/dev-i2c6.c index 4083108908a8..141d799944e2 100644 --- a/arch/arm/plat-samsung/dev-i2c6.c +++ b/arch/arm/plat-samsung/dev-i2c6.c | |||
@@ -43,26 +43,18 @@ struct platform_device s3c_device_i2c6 = { | |||
43 | .resource = s3c_i2c_resource, | 43 | .resource = s3c_i2c_resource, |
44 | }; | 44 | }; |
45 | 45 | ||
46 | static struct s3c2410_platform_i2c default_i2c_data6 __initdata = { | ||
47 | .flags = 0, | ||
48 | .bus_num = 6, | ||
49 | .slave_addr = 0x10, | ||
50 | .frequency = 100*1000, | ||
51 | .sda_delay = 100, | ||
52 | }; | ||
53 | |||
54 | void __init s3c_i2c6_set_platdata(struct s3c2410_platform_i2c *pd) | 46 | void __init s3c_i2c6_set_platdata(struct s3c2410_platform_i2c *pd) |
55 | { | 47 | { |
56 | struct s3c2410_platform_i2c *npd; | 48 | struct s3c2410_platform_i2c *npd; |
57 | 49 | ||
58 | if (!pd) | 50 | if (!pd) { |
59 | pd = &default_i2c_data6; | 51 | pd = &default_i2c_data; |
52 | pd->bus_num = 6; | ||
53 | } | ||
60 | 54 | ||
61 | npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL); | 55 | npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c), |
62 | if (!npd) | 56 | &s3c_device_i2c6); |
63 | printk(KERN_ERR "%s: no memory for platform data\n", __func__); | ||
64 | else if (!npd->cfg_gpio) | ||
65 | npd->cfg_gpio = s3c_i2c6_cfg_gpio; | ||
66 | 57 | ||
67 | s3c_device_i2c6.dev.platform_data = npd; | 58 | if (!npd->cfg_gpio) |
59 | npd->cfg_gpio = s3c_i2c6_cfg_gpio; | ||
68 | } | 60 | } |