aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32
diff options
context:
space:
mode:
Diffstat (limited to 'arch/avr32')
-rw-r--r--arch/avr32/mach-at32ap/at32ap700x.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
index 021d51217184..4ac38d28891d 100644
--- a/arch/avr32/mach-at32ap/at32ap700x.c
+++ b/arch/avr32/mach-at32ap/at32ap700x.c
@@ -1284,7 +1284,6 @@ at32_add_device_mci(unsigned int id, struct mci_platform_data *data)
1284{ 1284{
1285 struct mci_platform_data _data; 1285 struct mci_platform_data _data;
1286 struct platform_device *pdev; 1286 struct platform_device *pdev;
1287 struct dw_dma_slave *dws;
1288 1287
1289 if (id != 0) 1288 if (id != 0)
1290 return NULL; 1289 return NULL;
@@ -1300,6 +1299,8 @@ at32_add_device_mci(unsigned int id, struct mci_platform_data *data)
1300 if (!data) { 1299 if (!data) {
1301 data = &_data; 1300 data = &_data;
1302 memset(data, 0, sizeof(struct mci_platform_data)); 1301 memset(data, 0, sizeof(struct mci_platform_data));
1302 data->detect_pin = GPIO_PIN_NONE;
1303 data->wp_pin = GPIO_PIN_NONE;
1303 } 1304 }
1304 1305
1305 if (platform_device_add_data(pdev, data, 1306 if (platform_device_add_data(pdev, data,
@@ -1313,12 +1314,10 @@ at32_add_device_mci(unsigned int id, struct mci_platform_data *data)
1313 select_peripheral(PA(14), PERIPH_A, 0); /* DATA2 */ 1314 select_peripheral(PA(14), PERIPH_A, 0); /* DATA2 */
1314 select_peripheral(PA(15), PERIPH_A, 0); /* DATA3 */ 1315 select_peripheral(PA(15), PERIPH_A, 0); /* DATA3 */
1315 1316
1316 if (data) { 1317 if (data->detect_pin != GPIO_PIN_NONE)
1317 if (data->detect_pin != GPIO_PIN_NONE) 1318 at32_select_gpio(data->detect_pin, 0);
1318 at32_select_gpio(data->detect_pin, 0); 1319 if (data->wp_pin != GPIO_PIN_NONE)
1319 if (data->wp_pin != GPIO_PIN_NONE) 1320 at32_select_gpio(data->wp_pin, 0);
1320 at32_select_gpio(data->wp_pin, 0);
1321 }
1322 1321
1323 atmel_mci0_pclk.dev = &pdev->dev; 1322 atmel_mci0_pclk.dev = &pdev->dev;
1324 1323