diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2012-01-27 14:51:21 +0900 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2012-01-27 14:51:21 +0900 |
commit | 693cec9755e5198e0c291a4bfea6ebb1c7054550 (patch) | |
tree | 6fe5a4262cfbf3bf9535f392eb31b3acd765539e /arch/arm/plat-samsung | |
parent | 556ef3e474dd87d627655dafdf1e7eaf4747e388 (diff) |
ARM: SAMSUNG: Fix platform data setup for I2C adapter 0
The common static default_i2c_data structure gets bus_num set by each
s3c_i2c?_set_platdata() call, except for s3c_i2c0_set_platdata(). Thus
if for instance s3c_i2c1_set_platdata() is called prior to
s3c_i2c0_set_platdata() the I2C0 controller has bus_num set to wrong value
of 1, i.e. the one from previous set_platdata call. Fix this by also setting
bus_num for I2C0.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/plat-samsung')
-rw-r--r-- | arch/arm/plat-samsung/devs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index 32a6e394db24..f10768e988d4 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c @@ -468,8 +468,10 @@ void __init s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *pd) { struct s3c2410_platform_i2c *npd; - if (!pd) + if (!pd) { pd = &default_i2c_data; + pd->bus_num = 0; + } npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c), &s3c_device_i2c0); |