[PATCH 14/14] Move bq27000 data structures

Sven Rebhan odinshorse at googlemail.com
Sun Feb 22 22:08:23 CET 2009


It's always a good idea to first define the data structures you use. ;-)

Signed-off-by: Sven Rebhan <odinshorse at googlemail.com>

diff --git a/arch/arm/mach-s3c2442/mach-gta02.c b/arch/arm/mach-s3c2442/mach-gta02.c
index 9eaf0b2..26910a7 100644
--- a/arch/arm/mach-s3c2442/mach-gta02.c
+++ b/arch/arm/mach-s3c2442/mach-gta02.c
@@ -714,6 +714,25 @@ static void mangle_pmu_pdata_by_system_rev(void)
 }
 
 #ifdef CONFIG_HDQ_GPIO_BITBANG
+/* BQ27000 Battery */
+
+struct bq27000_platform_data bq27000_pdata = {
+	.name = "battery",
+	.rsense_mohms = 20,
+	.hdq_read = hdq_read,
+	.hdq_write = hdq_write,
+	.hdq_initialized = hdq_initialized,
+	.get_charger_online_status = gta02_get_charger_online_status,
+	.get_charger_active_status = gta02_get_charger_active_status
+};
+
+struct platform_device bq27000_battery_device = {
+	.name 		= "bq27000-battery",
+	.dev = {
+		.platform_data = &bq27000_pdata,
+	},
+};
+
 /* HDQ */
 
 static void gta02_hdq_attach_child_devices(struct device *parent_device)
@@ -778,25 +797,6 @@ struct platform_device gta02_hdq_device = {
 		.platform_data = &gta02_hdq_platform_data,
 	},
 };
-
-/* BQ27000 Battery */
-
-struct bq27000_platform_data bq27000_pdata = {
-	.name = "battery",
-	.rsense_mohms = 20,
-	.hdq_read = hdq_read,
-	.hdq_write = hdq_write,
-	.hdq_initialized = hdq_initialized,
-	.get_charger_online_status = gta02_get_charger_online_status,
-	.get_charger_active_status = gta02_get_charger_active_status
-};
-
-struct platform_device bq27000_battery_device = {
-	.name 		= "bq27000-battery",
-	.dev = {
-		.platform_data = &bq27000_pdata,
-	},
-};
 #endif
 
 
-- 
1.6.0.6




More information about the openmoko-kernel mailing list