]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] pxa: register Power I2C device only when necessary
authorEric Miao <eric.miao@marvell.com>
Fri, 28 Nov 2008 07:24:12 +0000 (15:24 +0800)
committerEric Miao <eric.miao@marvell.com>
Tue, 2 Dec 2008 06:42:40 +0000 (14:42 +0800)
Signed-off-by: Eric Miao <eric.miao@marvell.com>
arch/arm/mach-pxa/pxa27x.c
arch/arm/mach-pxa/pxa3xx.c

index 7c116693185b6700c12a7d3eb708c40ee7c8ae56..7769718a80b4d1f57e89020e47b221c83fb6acfe 100644 (file)
@@ -324,7 +324,7 @@ void __init pxa27x_set_i2c_power_info(struct i2c_pxa_platform_data *info)
        local_irq_disable();
        PCFR |= PCFR_PI2CEN;
        local_irq_enable();
-       pxa27x_device_i2c_power.dev.platform_data = info;
+       pxa_register_device(&pxa27x_device_i2c_power, info);
 }
 
 static struct platform_device *devices[] __initdata = {
@@ -334,7 +334,6 @@ static struct platform_device *devices[] __initdata = {
        &pxa_device_stuart,
        &pxa_device_i2s,
        &pxa_device_rtc,
-       &pxa27x_device_i2c_power,
        &pxa27x_device_ssp1,
        &pxa27x_device_ssp2,
        &pxa27x_device_ssp3,
index 7775f882493b7e29804937642724464e9100f53e..a9b17568473683a0ad95f94b85f8bdbdedc19373 100644 (file)
@@ -29,6 +29,7 @@
 #include <mach/pm.h>
 #include <mach/dma.h>
 #include <mach/ssp.h>
+#include <mach/i2c.h>
 
 #include "generic.h"
 #include "devices.h"
@@ -531,7 +532,7 @@ void __init pxa3xx_init_irq(void)
 
 void __init pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info)
 {
-       pxa3xx_device_i2c_power.dev.platform_data = info;
+       pxa_register_device(&pxa3xx_device_i2c_power, info);
 }
 
 static struct platform_device *devices[] __initdata = {
@@ -547,7 +548,6 @@ static struct platform_device *devices[] __initdata = {
        &pxa3xx_device_ssp4,
        &pxa27x_device_pwm0,
        &pxa27x_device_pwm1,
-       &pxa3xx_device_i2c_power,
 };
 
 static struct sys_device pxa3xx_sysdev[] = {