spi_imx: free gpio for chipselects before registering platform driver or it will fail

(cherry picked from commit 7909dd00e5ef8f6dd16d736bf43b80ad3a1f5fde)
This commit is contained in:
Matt Sealey
2010-12-22 01:54:24 -06:00
parent 176792006f
commit 3c0c41c42a

View File

@@ -241,6 +241,9 @@ void mx51_efikamx_init_spi(void)
#if defined(CONFIG_SPI_MXC)
mxc_register_device(&mxcspi1_device,
#elif defined(CONFIG_SPI_IMX)
gpio_free(IOMUX_TO_GPIO(MX51_PIN_CSPI1_SS0));
gpio_free(IOMUX_TO_GPIO(MX51_PIN_CSPI1_SS1));
mxc_register_device(&spi_imx_device,
#elif defined(CONFIG_SPI_GPIO)
/* mxc_request_iomux also requests gpio for us so free them before