diff options
author | Eric Miao <eric.miao@marvell.com> | 2008-11-28 02:24:12 -0500 |
---|---|---|
committer | Eric Miao <eric.miao@marvell.com> | 2008-12-02 01:42:40 -0500 |
commit | 14758220520c45755ae9de3c3073f03bd71f098a (patch) | |
tree | bf3c23e4ee120451b9fad9e6f51b715c0e5963dd /arch/arm | |
parent | 994642934d99b9a4d5447d628de7c321c4fde5fe (diff) |
[ARM] pxa: register Power I2C device only when necessary
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-pxa/pxa27x.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pxa3xx.c | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 7c116693185b..7769718a80b4 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -324,7 +324,7 @@ void __init pxa27x_set_i2c_power_info(struct i2c_pxa_platform_data *info) | |||
324 | local_irq_disable(); | 324 | local_irq_disable(); |
325 | PCFR |= PCFR_PI2CEN; | 325 | PCFR |= PCFR_PI2CEN; |
326 | local_irq_enable(); | 326 | local_irq_enable(); |
327 | pxa27x_device_i2c_power.dev.platform_data = info; | 327 | pxa_register_device(&pxa27x_device_i2c_power, info); |
328 | } | 328 | } |
329 | 329 | ||
330 | static struct platform_device *devices[] __initdata = { | 330 | static struct platform_device *devices[] __initdata = { |
@@ -334,7 +334,6 @@ static struct platform_device *devices[] __initdata = { | |||
334 | &pxa_device_stuart, | 334 | &pxa_device_stuart, |
335 | &pxa_device_i2s, | 335 | &pxa_device_i2s, |
336 | &pxa_device_rtc, | 336 | &pxa_device_rtc, |
337 | &pxa27x_device_i2c_power, | ||
338 | &pxa27x_device_ssp1, | 337 | &pxa27x_device_ssp1, |
339 | &pxa27x_device_ssp2, | 338 | &pxa27x_device_ssp2, |
340 | &pxa27x_device_ssp3, | 339 | &pxa27x_device_ssp3, |
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index 7775f882493b..a9b175684736 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <mach/pm.h> | 29 | #include <mach/pm.h> |
30 | #include <mach/dma.h> | 30 | #include <mach/dma.h> |
31 | #include <mach/ssp.h> | 31 | #include <mach/ssp.h> |
32 | #include <mach/i2c.h> | ||
32 | 33 | ||
33 | #include "generic.h" | 34 | #include "generic.h" |
34 | #include "devices.h" | 35 | #include "devices.h" |
@@ -531,7 +532,7 @@ void __init pxa3xx_init_irq(void) | |||
531 | 532 | ||
532 | void __init pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info) | 533 | void __init pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info) |
533 | { | 534 | { |
534 | pxa3xx_device_i2c_power.dev.platform_data = info; | 535 | pxa_register_device(&pxa3xx_device_i2c_power, info); |
535 | } | 536 | } |
536 | 537 | ||
537 | static struct platform_device *devices[] __initdata = { | 538 | static struct platform_device *devices[] __initdata = { |
@@ -547,7 +548,6 @@ static struct platform_device *devices[] __initdata = { | |||
547 | &pxa3xx_device_ssp4, | 548 | &pxa3xx_device_ssp4, |
548 | &pxa27x_device_pwm0, | 549 | &pxa27x_device_pwm0, |
549 | &pxa27x_device_pwm1, | 550 | &pxa27x_device_pwm1, |
550 | &pxa3xx_device_i2c_power, | ||
551 | }; | 551 | }; |
552 | 552 | ||
553 | static struct sys_device pxa3xx_sysdev[] = { | 553 | static struct sys_device pxa3xx_sysdev[] = { |