rk30: indent i2c code
author黄涛 <huangtao@rock-chips.com>
Tue, 7 Feb 2012 10:24:58 +0000 (18:24 +0800)
committer黄涛 <huangtao@rock-chips.com>
Tue, 7 Feb 2012 10:24:58 +0000 (18:24 +0800)
arch/arm/mach-rk30/board-rk30-sdk.c
arch/arm/mach-rk30/devices.c

index 73ee2a23da4f8074da5beb96a6cf9cca84882cb9..3b4201c219f71d5a49f77bb9728844b343694d8a 100755 (executable)
@@ -44,46 +44,51 @@ static struct platform_device *devices[] __initdata = {
 static struct i2c_board_info __initdata i2c0_info[] = {
 };
 #endif
+
 #ifdef CONFIG_I2C1_RK30
 static struct i2c_board_info __initdata i2c1_info[] = {
 };
 #endif
+
 #ifdef CONFIG_I2C2_RK30
 static struct i2c_board_info __initdata i2c2_info[] = {
 };
 #endif
+
 #ifdef CONFIG_I2C3_RK30
 static struct i2c_board_info __initdata i2c3_info[] = {
 };
 #endif
+
 #ifdef CONFIG_I2C4_RK30
 static struct i2c_board_info __initdata i2c4_info[] = {
 };
 #endif
+
 static void __init rk30_i2c_register_board_info(void)
 {
 #ifdef CONFIG_I2C0_RK30
-    i2c_register_board_info(0, i2c0_info, ARRAY_SIZE(i2c0_info));
+       i2c_register_board_info(0, i2c0_info, ARRAY_SIZE(i2c0_info));
 #endif
 #ifdef CONFIG_I2C1_RK30
-    i2c_register_board_info(1, i2c1_info, ARRAY_SIZE(i2c1_info));
+       i2c_register_board_info(1, i2c1_info, ARRAY_SIZE(i2c1_info));
 #endif
 #ifdef CONFIG_I2C2_RK30
-    i2c_register_board_info(2, i2c2_info, ARRAY_SIZE(i2c2_info));
+       i2c_register_board_info(2, i2c2_info, ARRAY_SIZE(i2c2_info));
 #endif
 #ifdef CONFIG_I2C3_RK30
-    i2c_register_board_info(3, i2c3_info, ARRAY_SIZE(i2c3_info));
+       i2c_register_board_info(3, i2c3_info, ARRAY_SIZE(i2c3_info));
 #endif
 #ifdef CONFIG_I2C4_RK30
-    i2c_register_board_info(4, i2c4_info, ARRAY_SIZE(i2c4_info));
+       i2c_register_board_info(4, i2c4_info, ARRAY_SIZE(i2c4_info));
 #endif
 }
 //end of i2c
 
 static void __init machine_rk30_board_init(void)
 {
-    rk30_i2c_register_board_info();
-    platform_add_devices(devices, ARRAY_SIZE(devices));
+       rk30_i2c_register_board_info();
+       platform_add_devices(devices, ARRAY_SIZE(devices));
 }
 
 static void __init rk30_reserve(void)
index d3af4dead45896bcd7d9ae1d03f2174f48e39737..1572590ef9db5f616d495780a8c6c2c5cfbbef5c 100644 (file)
@@ -129,15 +129,16 @@ static void __init rk30_init_uart(void)
 // i2c
 #ifdef CONFIG_I2C0_RK30
 static struct rk30_i2c_platform_data default_i2c0_data = {
-    .bus_num = 0,
-    .is_div_from_arm = 1,
-    #ifdef CONFIG_I2C0_CONTROLLER_RK29
-    .adap_type = I2C_RK29_ADAP,
-    #endif
-    #ifdef CONFIG_I2C0_CONTROLLER_RK30
-    .adap_type = I2C_RK30_ADAP,
-    #endif
+       .bus_num = 0,
+       .is_div_from_arm = 1,
+#ifdef CONFIG_I2C0_CONTROLLER_RK29
+       .adap_type = I2C_RK29_ADAP,
+#endif
+#ifdef CONFIG_I2C0_CONTROLLER_RK30
+       .adap_type = I2C_RK30_ADAP,
+#endif
 };
+
 static struct resource resources_i2c0[] = {
        {
                .start  = IRQ_I2C0,
@@ -156,22 +157,24 @@ static struct platform_device device_i2c0 = {
        .id     = 0,
        .num_resources  = ARRAY_SIZE(resources_i2c0),
        .resource       = resources_i2c0,
-    .dev                       = {
+       .dev            = {
                .platform_data = &default_i2c0_data,
        },
 };
 #endif
+
 #ifdef CONFIG_I2C1_RK30
 static struct rk30_i2c_platform_data default_i2c1_data = {
-    .bus_num = 1,
-    .is_div_from_arm = 1,
-    #ifdef CONFIG_I2C1_CONTROLLER_RK29
-    .adap_type = I2C_RK29_ADAP,
-    #endif
-    #ifdef CONFIG_I2C1_CONTROLLER_RK30
-    .adap_type = I2C_RK30_ADAP,
-    #endif
+       .bus_num = 1,
+       .is_div_from_arm = 1,
+#ifdef CONFIG_I2C1_CONTROLLER_RK29
+       .adap_type = I2C_RK29_ADAP,
+#endif
+#ifdef CONFIG_I2C1_CONTROLLER_RK30
+       .adap_type = I2C_RK30_ADAP,
+#endif
 };
+
 static struct resource resources_i2c1[] = {
        {
                .start  = IRQ_I2C1,
@@ -190,22 +193,24 @@ static struct platform_device device_i2c1 = {
        .id     = 1,
        .num_resources  = ARRAY_SIZE(resources_i2c1),
        .resource       = resources_i2c1,
-    .dev                       = {
+       .dev            = {
                .platform_data = &default_i2c1_data,
        },
 };
 #endif
+
 #ifdef CONFIG_I2C2_RK30
 static struct rk30_i2c_platform_data default_i2c2_data = {
-    .bus_num = 2,
-    .is_div_from_arm = 0,
-    #ifdef CONFIG_I2C2_CONTROLLER_RK29
-    .adap_type = I2C_RK29_ADAP,
-    #endif
-    #ifdef CONFIG_I2C2_CONTROLLER_RK30
-    .adap_type = I2C_RK30_ADAP,
-    #endif
+       .bus_num = 2,
+       .is_div_from_arm = 0,
+#ifdef CONFIG_I2C2_CONTROLLER_RK29
+       .adap_type = I2C_RK29_ADAP,
+#endif
+#ifdef CONFIG_I2C2_CONTROLLER_RK30
+       .adap_type = I2C_RK30_ADAP,
+#endif
 };
+
 static struct resource resources_i2c2[] = {
        {
                .start  = IRQ_I2C2,
@@ -224,7 +229,7 @@ static struct platform_device device_i2c2 = {
        .id     = 2,
        .num_resources  = ARRAY_SIZE(resources_i2c2),
        .resource       = resources_i2c2,
-    .dev                       = {
+       .dev            = {
                .platform_data = &default_i2c2_data,
        },
 };
@@ -232,15 +237,16 @@ static struct platform_device device_i2c2 = {
 
 #ifdef CONFIG_I2C3_RK30
 static struct rk30_i2c_platform_data default_i2c3_data = {
-    .bus_num = 3,
-    .is_div_from_arm = 0,
-    #ifdef CONFIG_I2C3_CONTROLLER_RK29
-    .adap_type = I2C_RK29_ADAP,
-    #endif
-    #ifdef CONFIG_I2C3_CONTROLLER_RK30
-    .adap_type = I2C_RK30_ADAP,
-    #endif
+       .bus_num = 3,
+       .is_div_from_arm = 0,
+#ifdef CONFIG_I2C3_CONTROLLER_RK29
+       .adap_type = I2C_RK29_ADAP,
+#endif
+#ifdef CONFIG_I2C3_CONTROLLER_RK30
+       .adap_type = I2C_RK30_ADAP,
+#endif
 };
+
 static struct resource resources_i2c3[] = {
        {
                .start  = IRQ_I2C3,
@@ -259,22 +265,24 @@ static struct platform_device device_i2c3 = {
        .id     = 3,
        .num_resources  = ARRAY_SIZE(resources_i2c3),
        .resource       = resources_i2c3,
-    .dev                       = {
+       .dev            = {
                .platform_data = &default_i2c3_data,
        },
 };
 #endif
+
 #ifdef CONFIG_I2C4_RK30
 static struct rk30_i2c_platform_data default_i2c4_data = {
-    .bus_num = 4,
-    .is_div_from_arm = 0,
-    #ifdef CONFIG_I2C4_CONTROLLER_RK29
-    .adap_type = I2C_RK29_ADAP,
-    #endif
-    #ifdef CONFIG_I2C4_CONTROLLER_RK30
-    .adap_type = I2C_RK30_ADAP,
-    #endif
+       .bus_num = 4,
+       .is_div_from_arm = 0,
+#ifdef CONFIG_I2C4_CONTROLLER_RK29
+       .adap_type = I2C_RK29_ADAP,
+#endif
+#ifdef CONFIG_I2C4_CONTROLLER_RK30
+       .adap_type = I2C_RK30_ADAP,
+#endif
 };
+
 static struct resource resources_i2c4[] = {
        {
                .start  = IRQ_I2C4,
@@ -293,7 +301,7 @@ static struct platform_device device_i2c4 = {
        .id     = 4,
        .num_resources  = ARRAY_SIZE(resources_i2c4),
        .resource       = resources_i2c4,
-    .dev                       = {
+       .dev            = {
                .platform_data = &default_i2c4_data,
        },
 };
@@ -319,7 +327,6 @@ static void __init rk30_init_i2c(void)
 }
 //end of i2c
 
-
 #ifdef CONFIG_MTD_NAND_RK29XX
 static struct resource resources_nand[] = {
        {