avr32: clean up mci platform code

This patch does a few small cleanups around the atmel mci platform code
and in the atmel-mci driver. The platform changes simply removes an
unused variable, uses the fact that by the end we always have some form
of platform data and notes that GPIO_PIN_NONE != 0. This last point
could cause the incorrect attempt to twice reserve pin PA0.

While we've got the hood up, add linux/err.h to the atmel-mci.c include
list. It needs it and generally pulls it by voodoo but I did once
stumble across a config which don't build.

This is against Linus' latest git.

Signed-off-by: Ben Nizette <bn@niasdigital.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>

authored by

Ben Nizette and committed by
Haavard Skinnemoen
fbfca4b8 62fe8378

+7 -7
+6 -7
arch/avr32/mach-at32ap/at32ap700x.c
··· 1284 1284 { 1285 1285 struct mci_platform_data _data; 1286 1286 struct platform_device *pdev; 1287 - struct dw_dma_slave *dws; 1288 1287 1289 1288 if (id != 0) 1290 1289 return NULL; ··· 1299 1300 if (!data) { 1300 1301 data = &_data; 1301 1302 memset(data, 0, sizeof(struct mci_platform_data)); 1303 + data->detect_pin = GPIO_PIN_NONE; 1304 + data->wp_pin = GPIO_PIN_NONE; 1302 1305 } 1303 1306 1304 1307 if (platform_device_add_data(pdev, data, ··· 1314 1313 select_peripheral(PA(14), PERIPH_A, 0); /* DATA2 */ 1315 1314 select_peripheral(PA(15), PERIPH_A, 0); /* DATA3 */ 1316 1315 1317 - if (data) { 1318 - if (data->detect_pin != GPIO_PIN_NONE) 1319 - at32_select_gpio(data->detect_pin, 0); 1320 - if (data->wp_pin != GPIO_PIN_NONE) 1321 - at32_select_gpio(data->wp_pin, 0); 1322 - } 1316 + if (data->detect_pin != GPIO_PIN_NONE) 1317 + at32_select_gpio(data->detect_pin, 0); 1318 + if (data->wp_pin != GPIO_PIN_NONE) 1319 + at32_select_gpio(data->wp_pin, 0); 1323 1320 1324 1321 atmel_mci0_pclk.dev = &pdev->dev; 1325 1322
+1
drivers/mmc/host/atmel-mci.c
··· 10 10 #include <linux/blkdev.h> 11 11 #include <linux/clk.h> 12 12 #include <linux/device.h> 13 + #include <linux/err.h> 13 14 #include <linux/init.h> 14 15 #include <linux/interrupt.h> 15 16 #include <linux/ioport.h>