spi: Updates for v3.10

A few last minute SPI updates: fix a missized allocation and use atomic
 allocations in atomic context in the PXA driver, and fix the checking of
 return codes in the S3C64xx driver which caused spurious errors under
 heavy load.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRyC7dAAoJELSic+t+oim9WG0P/i7Y7K/mKVcxtllYhgmCA8Hh
 rteUwd5EtD95/ZmG3L8t4sLODpG8lTCmttau4dxMDo2ZjQb4O+XnKrOfKIhPGQ9l
 6t0ySSpO3H0trOoq2cAF9yJAJsfOn/E/+iyiXR1b6OGvbmRHyfaXHSC4H3U7FuYJ
 SX1f36Ne1c3ItQIg6YLVsqLiu3YnExK1P/YVU5l7gVrQWrNFTc2YVygd6TkLBnDw
 6u4dbFlidN2OwSaRe9h1+IOYj6SVuAhQkTKq54LIwcQJ8+vvLo1Jt8VU3eLE/r7c
 0fKQBegVwAwanjn1KAH2mVQgITuT9w57Z7l9xf9r5U8F9XWDp8aYS8rfGXS4vWwh
 05GCGs9otJ219DLdxOWjDVOBA1JZXzGhX2kDUd7f6BQvrzZizCcXFv1S6e2y5lr0
 +BVSZa30lIHCzHo3K/OOqn4nfIk+h5ZQMqu8ZQJlqkTJsEdUCN3zR7w+wy2M6Bwx
 0YZzKDpiY3kf2F6SeTcgyWbwDoSI4HkBHsD7xrCneR+PQYNBi42OZvQAXIN7A9Yy
 TCPdx6yQHC0ShZdrH4pk5Z/PJAxOYGQIXhv1N9fjaHE22jAvV1V0skRt8L97x//4
 QXnq0pn3zSMaH8V3KizWHei/TLfOulurOQpbInedQK5z7VieqKgtqJCzJaH1Bb9I
 QM2xqq5mDEQoboxU0wGx
 =CFYh
 -----END PGP SIGNATURE-----

Merge tag 'spi-v3.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi updates from Mark Brown:
 "A few last minute SPI updates: fix a missized allocation and use
  atomic allocations in atomic context in the PXA driver, and fix the
  checking of return codes in the S3C64xx driver which caused spurious
  errors under heavy load."

* tag 'spi-v3.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi/pxa2xx: fix memory corruption due to wrong size used in devm_kzalloc()
  spi/pxa2xx: use GFP_ATOMIC in sg table allocation
  spi: s3c64xx: Fix pm_runtime_get_sync() return value check
This commit is contained in:
Linus Torvalds 2013-06-24 20:17:11 -10:00
commit f97f7d2d27
3 changed files with 3 additions and 3 deletions

View file

@ -59,7 +59,7 @@ static int pxa2xx_spi_map_dma_buffer(struct driver_data *drv_data,
int ret;
sg_free_table(sgt);
ret = sg_alloc_table(sgt, nents, GFP_KERNEL);
ret = sg_alloc_table(sgt, nents, GFP_ATOMIC);
if (ret)
return ret;
}

View file

@ -1075,7 +1075,7 @@ pxa2xx_spi_acpi_get_pdata(struct platform_device *pdev)
acpi_bus_get_device(ACPI_HANDLE(&pdev->dev), &adev))
return NULL;
pdata = devm_kzalloc(&pdev->dev, sizeof(*ssp), GFP_KERNEL);
pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
if (!pdata) {
dev_err(&pdev->dev,
"failed to allocate memory for platform data\n");

View file

@ -444,7 +444,7 @@ static int s3c64xx_spi_prepare_transfer(struct spi_master *spi)
}
ret = pm_runtime_get_sync(&sdd->pdev->dev);
if (ret != 0) {
if (ret < 0) {
dev_err(dev, "Failed to enable device: %d\n", ret);
goto out_tx;
}