diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-04-08 06:19:33 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-04-08 08:31:36 -0400 |
commit | cbfd6a21b6fae968d10374bc5913823573b517ef (patch) | |
tree | 56a3fdc6da40dac3b18bb15f45502e86abc1434a /drivers/spi | |
parent | f333a331adfacf8c7a9dbf7e5f72b10a0356156b (diff) |
spi/pxa2xx: Convert to devm_ioremap_resource()
Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.
devm_ioremap_resource() provides its own error messages; so all explicit
error messages can be removed from the failure code paths.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-pxa2xx.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index c6d5b97c7240..75a844623b4a 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/device.h> | 22 | #include <linux/device.h> |
23 | #include <linux/ioport.h> | 23 | #include <linux/ioport.h> |
24 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
25 | #include <linux/err.h> | ||
25 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
26 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
27 | #include <linux/spi/pxa2xx_spi.h> | 28 | #include <linux/spi/pxa2xx_spi.h> |
@@ -1088,11 +1089,9 @@ pxa2xx_spi_acpi_get_pdata(struct platform_device *pdev) | |||
1088 | ssp = &pdata->ssp; | 1089 | ssp = &pdata->ssp; |
1089 | 1090 | ||
1090 | ssp->phys_base = res->start; | 1091 | ssp->phys_base = res->start; |
1091 | ssp->mmio_base = devm_request_and_ioremap(&pdev->dev, res); | 1092 | ssp->mmio_base = devm_ioremap_resource(&pdev->dev, res); |
1092 | if (!ssp->mmio_base) { | 1093 | if (IS_ERR(ssp->mmio_base)) |
1093 | dev_err(&pdev->dev, "failed to ioremap mmio_base\n"); | 1094 | return PTR_ERR(ssp->mmio_base); |
1094 | return NULL; | ||
1095 | } | ||
1096 | 1095 | ||
1097 | ssp->clk = devm_clk_get(&pdev->dev, NULL); | 1096 | ssp->clk = devm_clk_get(&pdev->dev, NULL); |
1098 | ssp->irq = platform_get_irq(pdev, 0); | 1097 | ssp->irq = platform_get_irq(pdev, 0); |