From: Thomas Gleixner Date: Wed, 23 Feb 2011 08:21:41 +0000 (+0100) Subject: Merge branch 'linus' into x86/platform X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7acdbb3f35f4d08c0c4f7cfa306bc7006b6ba902;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Merge branch 'linus' into x86/platform Reason: Import mainline device tree changes on which further patches depend on or conflict. Trivial conflict in: drivers/spi/pxa2xx_spi_pci.c Signed-off-by: Thomas Gleixner --- 7acdbb3f35f4d08c0c4f7cfa306bc7006b6ba902 diff --cc drivers/spi/pxa2xx_spi_pci.c index b6589bb3a6c3,19752b09e155..378e504f89eb --- a/drivers/spi/pxa2xx_spi_pci.c +++ b/drivers/spi/pxa2xx_spi_pci.c @@@ -84,25 -75,24 +75,22 @@@ static int __devinit ce4100_spi_probe(s return ret; } + pdev = platform_device_alloc("pxa2xx-spi", dev->devfn); spi_info = kzalloc(sizeof(*spi_info), GFP_KERNEL); - if (!spi_info) { + if (!pdev || !spi_info ) { ret = -ENOMEM; - goto err_kz; + goto err_nomem; } - ssp = &spi_info->ssp; - pdev = &spi_info->spi_pdev; - spi_pdata = &spi_info->spi_pdata; + memset(&spi_pdata, 0, sizeof(spi_pdata)); + spi_pdata.num_chipselect = dev->devfn; - pdev->name = "pxa2xx-spi"; - pdev->id = dev->devfn; - pdev->dev.parent = &dev->dev; - pdev->dev.platform_data = &spi_info->spi_pdata; + ret = platform_device_add_data(pdev, &spi_pdata, sizeof(spi_pdata)); + if (ret) + goto err_nomem; + pdev->dev.parent = &dev->dev; -#ifdef CONFIG_OF pdev->dev.of_node = dev->dev.of_node; - pdev->dev.release = plat_dev_release; - - spi_pdata->num_chipselect = dev->devfn; - -#endif + ssp = &spi_info->ssp; ssp->phys_base = pci_resource_start(dev, 0); ssp->mmio_base = ioremap(phys_beg, phys_len); if (!ssp->mmio_base) {