diff options
author | Arnd Bergmann <arnd@arndb.de> | 2014-03-13 12:47:23 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2014-03-21 13:19:30 -0400 |
commit | 871336a93794d9144a94c51a85489cb890462f64 (patch) | |
tree | 640c283d553a6ec9346b63549e81b52ff946b12c /arch/arm/mach-at91 | |
parent | c85fc989f92a1590477e22bf582712f9ab35f48e (diff) |
ARM: at91: fix broken "if () else" statement
If CONFIG_PATA_AT91 is disabled, the code in at91_add_device_cf
is turned into invalid C statements due to the lack of an
expression before the 'else' clause.
This moves the first half of the condition inside of the #ifdef,
which seems to be what the author intended.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Andrew Victor <linux@maxim.org.za>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r-- | arch/arm/mach-at91/at91sam9260_devices.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index eda8d1679d40..8a4c6656b608 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c | |||
@@ -1255,12 +1255,8 @@ void __init at91_add_device_cf(struct at91_cf_data *data) | |||
1255 | at91_set_A_periph(AT91_PIN_PC10, 0); /* CFRNW */ | 1255 | at91_set_A_periph(AT91_PIN_PC10, 0); /* CFRNW */ |
1256 | at91_set_A_periph(AT91_PIN_PC15, 1); /* NWAIT */ | 1256 | at91_set_A_periph(AT91_PIN_PC15, 1); /* NWAIT */ |
1257 | 1257 | ||
1258 | if (data->flags & AT91_CF_TRUE_IDE) | 1258 | if (IS_ENABLED(CONFIG_PATA_AT91) && (data->flags & AT91_CF_TRUE_IDE) |
1259 | #if defined(CONFIG_PATA_AT91) || defined(CONFIG_PATA_AT91_MODULE) | ||
1260 | pdev->name = "pata_at91"; | 1259 | pdev->name = "pata_at91"; |
1261 | #else | ||
1262 | #warning "board requires AT91_CF_TRUE_IDE: enable pata_at91" | ||
1263 | #endif | ||
1264 | else | 1260 | else |
1265 | pdev->name = "at91_cf"; | 1261 | pdev->name = "at91_cf"; |
1266 | 1262 | ||