Signed-off-by: Eric Miao <eric.miao@marvell.com>
        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 = {
        &pxa_device_stuart,
        &pxa_device_i2s,
        &pxa_device_rtc,
-       &pxa27x_device_i2c_power,
        &pxa27x_device_ssp1,
        &pxa27x_device_ssp2,
        &pxa27x_device_ssp3,
 
 #include <mach/pm.h>
 #include <mach/dma.h>
 #include <mach/ssp.h>
+#include <mach/i2c.h>
 
 #include "generic.h"
 #include "devices.h"
 
 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 = {
        &pxa3xx_device_ssp4,
        &pxa27x_device_pwm0,
        &pxa27x_device_pwm1,
-       &pxa3xx_device_i2c_power,
 };
 
 static struct sys_device pxa3xx_sysdev[] = {