diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-11-24 10:05:46 +0100 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-12-23 19:18:36 -0700 |
commit | 893421745a052100b981401b7c5c6dc8708fb8a0 (patch) | |
tree | 190015b678505b5e28801cfd5102aec2ab0a5bf4 /drivers/spi | |
parent | 752a4a95e3c96a8e8d3405b16d292f13e8c7856b (diff) | |
download | linux-3.10-893421745a052100b981401b7c5c6dc8708fb8a0.tar.gz linux-3.10-893421745a052100b981401b7c5c6dc8708fb8a0.tar.bz2 linux-3.10-893421745a052100b981401b7c5c6dc8708fb8a0.zip |
spi/imx: remove autodetection
There are no machines in-tree that still use the driver
name as device name. So save a few bytes and remove it.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Jason Wang <jason77.wang@gmail.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi_imx.c | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c index 55a38e2c6c1..9010ef0385a 100644 --- a/drivers/spi/spi_imx.c +++ b/drivers/spi/spi_imx.c @@ -66,7 +66,6 @@ enum spi_imx_devtype { SPI_IMX_VER_0_5, SPI_IMX_VER_0_7, SPI_IMX_VER_2_3, - SPI_IMX_VER_AUTODETECT, }; struct spi_imx_data; @@ -720,9 +719,6 @@ static void spi_imx_cleanup(struct spi_device *spi) static struct platform_device_id spi_imx_devtype[] = { { - .name = DRIVER_NAME, - .driver_data = SPI_IMX_VER_AUTODETECT, - }, { .name = "imx1-cspi", .driver_data = SPI_IMX_VER_IMX1, }, { @@ -802,30 +798,8 @@ static int __devinit spi_imx_probe(struct platform_device *pdev) init_completion(&spi_imx->xfer_done); - if (pdev->id_entry->driver_data == SPI_IMX_VER_AUTODETECT) { - if (cpu_is_mx25() || cpu_is_mx35()) - spi_imx->devtype_data = - spi_imx_devtype_data[SPI_IMX_VER_0_7]; - else if (cpu_is_mx25() || cpu_is_mx31() || cpu_is_mx35()) - spi_imx->devtype_data = - spi_imx_devtype_data[SPI_IMX_VER_0_4]; - else if (cpu_is_mx27() || cpu_is_mx21()) - spi_imx->devtype_data = - spi_imx_devtype_data[SPI_IMX_VER_0_0]; - else if (cpu_is_mx1()) - spi_imx->devtype_data = - spi_imx_devtype_data[SPI_IMX_VER_IMX1]; - else - BUG(); - } else - spi_imx->devtype_data = - spi_imx_devtype_data[pdev->id_entry->driver_data]; - - if (!spi_imx->devtype_data.intctrl) { - dev_err(&pdev->dev, "no support for this device compiled in\n"); - ret = -ENODEV; - goto out_gpio_free; - } + spi_imx->devtype_data = + spi_imx_devtype_data[pdev->id_entry->driver_data]; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res) { |