diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 05:09:18 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-25 15:21:47 -0500 |
commit | b0ee5605234a24f209b803f691957e5012eebf9a (patch) | |
tree | 498cf37959e4743600ded67456324fc6505de8b6 /drivers/spi/spi-s3c64xx.c | |
parent | e2cbdf3cb72571f1231cd7c3cb14009f9b8df707 (diff) |
spi: Convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() 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: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/spi/spi-s3c64xx.c')
-rw-r--r-- | drivers/spi/spi-s3c64xx.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index ad93231a8038..3d4a7c48d74d 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c | |||
@@ -1276,10 +1276,9 @@ static int __init s3c64xx_spi_probe(struct platform_device *pdev) | |||
1276 | /* the spi->mode bits understood by this driver: */ | 1276 | /* the spi->mode bits understood by this driver: */ |
1277 | master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH; | 1277 | master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH; |
1278 | 1278 | ||
1279 | sdd->regs = devm_request_and_ioremap(&pdev->dev, mem_res); | 1279 | sdd->regs = devm_ioremap_resource(&pdev->dev, mem_res); |
1280 | if (sdd->regs == NULL) { | 1280 | if (IS_ERR(sdd->regs)) { |
1281 | dev_err(&pdev->dev, "Unable to remap IO\n"); | 1281 | ret = PTR_ERR(sdd->regs); |
1282 | ret = -ENXIO; | ||
1283 | goto err1; | 1282 | goto err1; |
1284 | } | 1283 | } |
1285 | 1284 | ||