spi: pxa2xx: Use an enum for type
authorLubomir Rintel <lkundrak@v3.sk>
Wed, 10 Oct 2018 17:09:28 +0000 (19:09 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 11 Oct 2018 14:28:03 +0000 (15:28 +0100)
That seems to be the correct type.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-pxa2xx.c
include/linux/pxa2xx_ssp.h

index d68f511a9ef1526483ec6bd4271f4581609e2a7a..8baa5b038f15f89d65591881bd41094bbaec1ce3 100644 (file)
@@ -1431,7 +1431,7 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
        struct resource *res;
        const struct acpi_device_id *adev_id = NULL;
        const struct pci_device_id *pcidev_id = NULL;
-       int type;
+       enum pxa_ssp_type type;
 
        adev = ACPI_COMPANION(&pdev->dev);
 
@@ -1445,9 +1445,9 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
                return NULL;
 
        if (adev_id)
-               type = (int)adev_id->driver_data;
+               type = (enum pxa_ssp_type)adev_id->driver_data;
        else if (pcidev_id)
-               type = (int)pcidev_id->driver_data;
+               type = (enum pxa_ssp_type)pcidev_id->driver_data;
        else
                return NULL;
 
index 13b4244d44c1f8ebf052a8f31f36671ca53a667d..262e1f3188361b4c56b7b10941796115b8fff96c 100644 (file)
@@ -217,7 +217,7 @@ struct ssp_device {
 
        const char      *label;
        int             port_id;
-       int             type;
+       enum pxa_ssp_type type;
        int             use_count;
        int             irq;