From 3a5691326ed3d6a276b4a8663a9190bf73f5de2b Mon Sep 17 00:00:00 2001 From: Paul Gortmaker Date: Tue, 6 Mar 2012 14:46:43 -0500 Subject: ARM: pxa: fix regulator related build fail in magician_defconfig commit 737f360d5bef5e01c6cfa755dca0b449a154c1e0 (linux-next) "regulator: Remove support for supplies specified by struct device" deletes the field from the struct, but this platform was still trying to set those fields. Delete the assignments. arch/arm/mach-pxa/magician.c:581: error: unknown field 'dev' specified in initializer arch/arm/mach-pxa/magician.c:581: warning: initialization from incompatible pointer type arch/arm/mach-pxa/magician.c:585: error: unknown field 'dev' specified in initializer arch/arm/mach-pxa/magician.c:585: warning: initialization from incompatible pointer type arch/arm/mach-pxa/hx4700.c:683: error: unknown field 'dev' specified in initializer arch/arm/mach-pxa/hx4700.c:683: warning: initialization from incompatible pointer type arch/arm/mach-pxa/hx4700.c:687: error: unknown field 'dev' specified in initializer arch/arm/mach-pxa/hx4700.c:687: warning: initialization from incompatible pointer type Signed-off-by: Paul Gortmaker Signed-off-by: Haojian Zhuang diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c index 208eef1..d8c01e9 100644 --- a/arch/arm/mach-pxa/hx4700.c +++ b/arch/arm/mach-pxa/hx4700.c @@ -664,11 +664,9 @@ static struct platform_device power_supply = { static struct regulator_consumer_supply bq24022_consumers[] = { { - .dev = &gpio_vbus.dev, .supply = "vbus_draw", }, { - .dev = &power_supply.dev, .supply = "ac_draw", }, }; diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index 3d6baf9..bd0f86a 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c @@ -578,11 +578,9 @@ static struct platform_device power_supply = { static struct regulator_consumer_supply bq24022_consumers[] = { { - .dev = &gpio_vbus.dev, .supply = "vbus_draw", }, { - .dev = &power_supply.dev, .supply = "ac_draw", }, }; -- cgit v0.10.2 From 804d2312309aaf8b80a09038cf12333f0cb4f32c Mon Sep 17 00:00:00 2001 From: Paul Gortmaker Date: Fri, 30 Mar 2012 08:41:02 +0800 Subject: ARM: pxa: fix build failure for regulator consumer in em-x270.c Commit 737f360d5bef5e01c6cfa755dca0b449a154c1e0 "regulator: Remove support for supplies specified by struct device" caused this file to break, since it was still relying on the device field to be present. Map it onto dev_name appropriately Since there are two consumers with the name "reg-userspace-consumer", we have to supply the ID as a suffix in the REGULATOR_CONSUMER calls. Signed-off-by: Paul Gortmaker CC: Mark Brown Signed-off-by: Haojian Zhuang diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c index d80c0ba..b88e11c 100644 --- a/arch/arm/mach-pxa/em-x270.c +++ b/arch/arm/mach-pxa/em-x270.c @@ -1083,19 +1083,19 @@ static void __init em_x270_userspace_consumers_init(void) } /* DA9030 related initializations */ -#define REGULATOR_CONSUMER(_name, _dev, _supply) \ +#define REGULATOR_CONSUMER(_name, _dev_name, _supply) \ static struct regulator_consumer_supply _name##_consumers[] = { \ { \ - .dev = _dev, \ + .dev_name = _dev_name, \ .supply = _supply, \ }, \ } -REGULATOR_CONSUMER(ldo3, &em_x270_gps_userspace_consumer.dev, "vcc gps"); +REGULATOR_CONSUMER(ldo3, "reg-userspace-consumer.0", "vcc gps"); REGULATOR_CONSUMER(ldo5, NULL, "vcc cam"); -REGULATOR_CONSUMER(ldo10, &pxa_device_mci.dev, "vcc sdio"); +REGULATOR_CONSUMER(ldo10, "pxa2xx-mci", "vcc sdio"); REGULATOR_CONSUMER(ldo12, NULL, "vcc usb"); -REGULATOR_CONSUMER(ldo19, &em_x270_gprs_userspace_consumer.dev, "vcc gprs"); +REGULATOR_CONSUMER(ldo19, "reg-userspace-consumer.1", "vcc gprs"); REGULATOR_CONSUMER(buck2, NULL, "vcc_core"); #define REGULATOR_INIT(_ldo, _min_uV, _max_uV, _ops_mask) \ -- cgit v0.10.2 From e9478587c4fb43059f45acf25ee0959710280bdf Mon Sep 17 00:00:00 2001 From: Haojian Zhuang Date: Fri, 30 Mar 2012 08:53:27 +0800 Subject: ARM: pxa: fix build issue on cm-x300 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit arch/arm/mach-pxa/cm-x300.c:716:3: error: unknown field ‘dev’ specified in initializer make[1]: *** [arch/arm/mach-pxa/cm-x300.o] Error 1 make: *** [arch/arm/mach-pxa] Error 2 It's caused by 'dev' field removed from struct regulator_consumer_supply. Signed-off-by: Haojian Zhuang diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c index 4b981b8..56a5cc1 100644 --- a/arch/arm/mach-pxa/cm-x300.c +++ b/arch/arm/mach-pxa/cm-x300.c @@ -713,7 +713,6 @@ struct da9030_battery_info cm_x300_battery_info = { static struct regulator_consumer_supply buck2_consumers[] = { { - .dev = NULL, .supply = "vcc_core", }, }; -- cgit v0.10.2 From 5616131daff6047d293b25a05cff7b1890efd6a3 Mon Sep 17 00:00:00 2001 From: Haojian Zhuang Date: Fri, 30 Mar 2012 09:00:50 +0800 Subject: ARM: pxa: fix build issue on stargate2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit arch/arm/mach-pxa/stargate2.c:155:3: error: unknown field ‘dev’ specified in initializer arch/arm/mach-pxa/stargate2.c:155:3: warning: initialization from incompatible pointer type [enabled by default] arch/arm/mach-pxa/stargate2.c:155:3: warning: (near initialization for ‘stargate2_sensor_3_con[0].dev_name’) [enabled by default] make[1]: *** [arch/arm/mach-pxa/stargate2.o] Error 1 make: *** [arch/arm/mach-pxa] Error 2 It's caused by 'dev' field removed from struct regulator_consumer_supply. Signed-off-by: Haojian Zhuang diff --git a/arch/arm/mach-pxa/stargate2.c b/arch/arm/mach-pxa/stargate2.c index b0656e15..227a630 100644 --- a/arch/arm/mach-pxa/stargate2.c +++ b/arch/arm/mach-pxa/stargate2.c @@ -152,7 +152,7 @@ static struct platform_device sht15 = { static struct regulator_consumer_supply stargate2_sensor_3_con[] = { { - .dev = &sht15.dev, + .dev_name = "sht15", .supply = "vcc", }, }; -- cgit v0.10.2