diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-11-21 07:10:54 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-02-12 12:32:40 -0500 |
commit | 44c5d739181886cff8e3903dfa38cd704f3d9640 (patch) | |
tree | 2fb88f5953018c20816995c6a5140cc766b782f0 /arch/arm/mach-pnx4008 | |
parent | 88d968b22fa26d5e3a8cab46fc7c3a21c89a91d3 (diff) |
ARM: PNX4008: kzalloc i2c drivers internal data
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pnx4008')
-rw-r--r-- | arch/arm/mach-pnx4008/i2c.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/arch/arm/mach-pnx4008/i2c.c b/arch/arm/mach-pnx4008/i2c.c index 23ec335a4bc0..33146e832dd7 100644 --- a/arch/arm/mach-pnx4008/i2c.c +++ b/arch/arm/mach-pnx4008/i2c.c | |||
@@ -18,45 +18,34 @@ | |||
18 | #include <mach/irqs.h> | 18 | #include <mach/irqs.h> |
19 | #include <mach/i2c.h> | 19 | #include <mach/i2c.h> |
20 | 20 | ||
21 | static struct i2c_pnx_algo_data pnx_algo_data0 = { | ||
22 | .base = PNX4008_I2C1_BASE, | ||
23 | .irq = I2C_1_INT, | ||
24 | }; | ||
25 | |||
26 | static struct i2c_pnx_algo_data pnx_algo_data1 = { | ||
27 | .base = PNX4008_I2C2_BASE, | ||
28 | .irq = I2C_2_INT, | ||
29 | }; | ||
30 | |||
31 | static struct i2c_pnx_algo_data pnx_algo_data2 = { | ||
32 | .base = (PNX4008_USB_CONFIG_BASE + 0x300), | ||
33 | .irq = USB_I2C_INT, | ||
34 | }; | ||
35 | |||
36 | static struct i2c_adapter pnx_adapter0 = { | 21 | static struct i2c_adapter pnx_adapter0 = { |
37 | .name = I2C_CHIP_NAME "0", | 22 | .name = I2C_CHIP_NAME "0", |
38 | .algo_data = &pnx_algo_data0, | ||
39 | }; | 23 | }; |
24 | |||
40 | static struct i2c_adapter pnx_adapter1 = { | 25 | static struct i2c_adapter pnx_adapter1 = { |
41 | .name = I2C_CHIP_NAME "1", | 26 | .name = I2C_CHIP_NAME "1", |
42 | .algo_data = &pnx_algo_data1, | ||
43 | }; | 27 | }; |
44 | 28 | ||
45 | static struct i2c_adapter pnx_adapter2 = { | 29 | static struct i2c_adapter pnx_adapter2 = { |
46 | .name = "USB-I2C", | 30 | .name = "USB-I2C", |
47 | .algo_data = &pnx_algo_data2, | ||
48 | }; | 31 | }; |
49 | 32 | ||
50 | static struct i2c_pnx_data i2c0_data = { | 33 | static struct i2c_pnx_data i2c0_data = { |
51 | .adapter = &pnx_adapter0, | 34 | .adapter = &pnx_adapter0, |
35 | .base = PNX4008_I2C1_BASE, | ||
36 | .irq = I2C_1_INT, | ||
52 | }; | 37 | }; |
53 | 38 | ||
54 | static struct i2c_pnx_data i2c1_data = { | 39 | static struct i2c_pnx_data i2c1_data = { |
55 | .adapter = &pnx_adapter1, | 40 | .adapter = &pnx_adapter1, |
41 | .base = PNX4008_I2C2_BASE, | ||
42 | .irq = I2C_2_INT, | ||
56 | }; | 43 | }; |
57 | 44 | ||
58 | static struct i2c_pnx_data i2c2_data = { | 45 | static struct i2c_pnx_data i2c2_data = { |
59 | .adapter = &pnx_adapter2, | 46 | .adapter = &pnx_adapter2, |
47 | .base = (PNX4008_USB_CONFIG_BASE + 0x300), | ||
48 | .irq = USB_I2C_INT, | ||
60 | }; | 49 | }; |
61 | 50 | ||
62 | static struct platform_device i2c0_device = { | 51 | static struct platform_device i2c0_device = { |