Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755453AbcKXQac (ORCPT ); Thu, 24 Nov 2016 11:30:32 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:50906 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751010AbcKXQab (ORCPT ); Thu, 24 Nov 2016 11:30:31 -0500 From: Arnd Bergmann To: Robert Jarzmik Cc: Arnd Bergmann , Daniel Ribeiro , Stefan Schmidt , Harald Welte , Daniel Mack , Haojian Zhuang , Thierry Reding , openezx-devel@lists.openezx.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: pxa: ezx: fix a910 camera data Date: Thu, 24 Nov 2016 17:29:18 +0100 Message-Id: <20161124162955.3887066-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:+egpkwM/c5Hpk7GNBA0HP5iciBOS5jRKCoWR4ajEq1QiQR/GUm9 Nwg2mOqcEzA8wnSrf+xBMC7wVKc5QddoqObbZpx5f9gacw/FcTJkIX12Z2WuieLltQ0cp9x 3vP5oNAvcBlWTRUeoUZJz57LVnlrJUF2/lgkEeJGWj/AayNSbW6Nn5+CD++AaZmcWQLq+PA p1aBKO941Qz8luTwMlAww== X-UI-Out-Filterresults: notjunk:1;V01:K0:DYfaPmePGVM=:IomzJaRc8idevdupeB6GSo ESKDM+XotVS5udCUMXbqr+7KoUVRisw+7C8WdEO3wIcfOQahdacBva6JwuA+uA4kvdsuuBd+f ZHV4MAGwdeeO8OItYLFcT34wXKBum6lnozLmHzB3+dXNkIz44psWlxnQqvQjYrbewd1Tyvjgw ya9JWHLCsdZQCFyUpFC5Au7uoh9ma00VIkdzZ1KhrU24N+rBaf2bO/spi8ReJx3Q1JxU/Fo0P 1kk0BgvkC3N5OiJ/+kSws9d29rIwtqLYdn3TqiRk5cntU96OFbKVlxXywYdvdZPqihJIF0VwA SVyBGYRyWAIqLnJq3onTY5EyPci67rIO/EMuwdIdLdjdqxF7yXYs7mLRkL3TBGH+f6ult8anR ztsmRINDSfDLNpYqkRQHpqIz2sZr9NLnF8ZqSVb6cUQORPb6k7j9ept/4p3f8hLRvmqZg79Q/ lpXYn3nHcaU92riJ9cKjtCdViubaeo/YX6/gcY1A8+k1qZoc2VZ+6uDQd41afVEKG/+Wg3Vnk g143WNF0TB4Zq0NaT9D3A2HbGe8GU8HGaKzems9fJwsp04tTHQTSVsWuEmHqNxpDdnH8z6Exz tF2MNmRNi73RfrQx4QVxt0be/iZvt7ehg4cw7u7ODbr74K75Lc2lGcFwDtdZg+G3rDiebwmv8 0d2f2+M+Ip0Ua30K07ADcw5N3Z/sIoA32yysPjj9/WqI1mVmBmrL7m7nRtroliM6ge0pvCeOT oFk7H+OnSTRMx39U Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2503 Lines: 90 The camera_supply_dummy_device definition is shared between a780 and a910, but only provided when the first is enabled and fails to build for a configuration with only a910: arch/arm/mach-pxa/ezx.c:1097:3: error: 'camera_supply_dummy_device' undeclared here (not in a function) This moves the definition into its own section. Fixes: 6c1b417adc8f ("ARM: pxa: ezx: use the new pxa_camera platform_data") Signed-off-by: Arnd Bergmann --- arch/arm/mach-pxa/ezx.c | 56 ++++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c index 0b8300e6fca3..a057cf9c0e7b 100644 --- a/arch/arm/mach-pxa/ezx.c +++ b/arch/arm/mach-pxa/ezx.c @@ -696,32 +696,7 @@ static struct pxa27x_keypad_platform_data e2_keypad_platform_data = { }; #endif /* CONFIG_MACH_EZX_E2 */ -#ifdef CONFIG_MACH_EZX_A780 -/* gpio_keys */ -static struct gpio_keys_button a780_buttons[] = { - [0] = { - .code = SW_LID, - .gpio = GPIO12_A780_FLIP_LID, - .active_low = 0, - .desc = "A780 flip lid", - .type = EV_SW, - .wakeup = 1, - }, -}; - -static struct gpio_keys_platform_data a780_gpio_keys_platform_data = { - .buttons = a780_buttons, - .nbuttons = ARRAY_SIZE(a780_buttons), -}; - -static struct platform_device a780_gpio_keys = { - .name = "gpio-keys", - .id = -1, - .dev = { - .platform_data = &a780_gpio_keys_platform_data, - }, -}; - +#if defined(CONFIG_MACH_EZX_A780) || defined(CONFIG_MACH_EZX_A910) /* camera */ static struct regulator_consumer_supply camera_dummy_supplies[] = { REGULATOR_SUPPLY("vdd", "0-005d"), @@ -750,6 +725,35 @@ static struct platform_device camera_supply_dummy_device = { .platform_data = &camera_dummy_config, }, }; +#endif + +#ifdef CONFIG_MACH_EZX_A780 +/* gpio_keys */ +static struct gpio_keys_button a780_buttons[] = { + [0] = { + .code = SW_LID, + .gpio = GPIO12_A780_FLIP_LID, + .active_low = 0, + .desc = "A780 flip lid", + .type = EV_SW, + .wakeup = 1, + }, +}; + +static struct gpio_keys_platform_data a780_gpio_keys_platform_data = { + .buttons = a780_buttons, + .nbuttons = ARRAY_SIZE(a780_buttons), +}; + +static struct platform_device a780_gpio_keys = { + .name = "gpio-keys", + .id = -1, + .dev = { + .platform_data = &a780_gpio_keys_platform_data, + }, +}; + +/* camera */ static int a780_camera_reset(struct device *dev) { gpio_set_value(GPIO19_GEN1_CAM_RST, 0); -- 2.9.0