spi-pxa2xx.c (2c1833767bd8d906489a91cbbcb151fe3b818b61) | spi-pxa2xx.c (55ef8262f2b1b31762b045b14182db3cc8f607d1) |
---|---|
1/* 2 * Copyright (C) 2005 Stephen Street / StreetFire Sound Labs 3 * Copyright (C) 2013, Intel Corporation 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 1417 unchanged lines hidden (view full) --- 1426pxa2xx_spi_init_pdata(struct platform_device *pdev) 1427{ 1428 struct pxa2xx_spi_master *pdata; 1429 struct acpi_device *adev; 1430 struct ssp_device *ssp; 1431 struct resource *res; 1432 const struct acpi_device_id *adev_id = NULL; 1433 const struct pci_device_id *pcidev_id = NULL; | 1/* 2 * Copyright (C) 2005 Stephen Street / StreetFire Sound Labs 3 * Copyright (C) 2013, Intel Corporation 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 1417 unchanged lines hidden (view full) --- 1426pxa2xx_spi_init_pdata(struct platform_device *pdev) 1427{ 1428 struct pxa2xx_spi_master *pdata; 1429 struct acpi_device *adev; 1430 struct ssp_device *ssp; 1431 struct resource *res; 1432 const struct acpi_device_id *adev_id = NULL; 1433 const struct pci_device_id *pcidev_id = NULL; |
1434 int type; | 1434 enum pxa_ssp_type type; |
1435 1436 adev = ACPI_COMPANION(&pdev->dev); 1437 1438 if (dev_is_pci(pdev->dev.parent)) 1439 pcidev_id = pci_match_id(pxa2xx_spi_pci_compound_match, 1440 to_pci_dev(pdev->dev.parent)); 1441 else if (adev) 1442 adev_id = acpi_match_device(pdev->dev.driver->acpi_match_table, 1443 &pdev->dev); 1444 else 1445 return NULL; 1446 1447 if (adev_id) | 1435 1436 adev = ACPI_COMPANION(&pdev->dev); 1437 1438 if (dev_is_pci(pdev->dev.parent)) 1439 pcidev_id = pci_match_id(pxa2xx_spi_pci_compound_match, 1440 to_pci_dev(pdev->dev.parent)); 1441 else if (adev) 1442 adev_id = acpi_match_device(pdev->dev.driver->acpi_match_table, 1443 &pdev->dev); 1444 else 1445 return NULL; 1446 1447 if (adev_id) |
1448 type = (int)adev_id->driver_data; | 1448 type = (enum pxa_ssp_type)adev_id->driver_data; |
1449 else if (pcidev_id) | 1449 else if (pcidev_id) |
1450 type = (int)pcidev_id->driver_data; | 1450 type = (enum pxa_ssp_type)pcidev_id->driver_data; |
1451 else 1452 return NULL; 1453 1454 pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); 1455 if (!pdata) 1456 return NULL; 1457 1458 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); --- 396 unchanged lines hidden --- | 1451 else 1452 return NULL; 1453 1454 pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); 1455 if (!pdata) 1456 return NULL; 1457 1458 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); --- 396 unchanged lines hidden --- |