aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/intel_msic.c
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2013-01-21 05:09:09 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-25 15:21:47 -0500
commit6c2db1c682a9668b854f9f4025650f7145bd090f (patch)
treea284310673a3a4a70cc5b90c22983d0775d3bd62 /drivers/mfd/intel_msic.c
parentd65e8e4a1cae5f92f21d4efd6999d6fcbc9ddc0e (diff)
mfd: 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: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mfd/intel_msic.c')
-rw-r--r--drivers/mfd/intel_msic.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/mfd/intel_msic.c b/drivers/mfd/intel_msic.c
index ab8d0b2739b2..1804331bd52c 100644
--- a/drivers/mfd/intel_msic.c
+++ b/drivers/mfd/intel_msic.c
@@ -9,6 +9,7 @@
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 */ 10 */
11 11
12#include <linux/err.h>
12#include <linux/gpio.h> 13#include <linux/gpio.h>
13#include <linux/io.h> 14#include <linux/io.h>
14#include <linux/module.h> 15#include <linux/module.h>
@@ -424,11 +425,9 @@ static int intel_msic_probe(struct platform_device *pdev)
424 return -ENODEV; 425 return -ENODEV;
425 } 426 }
426 427
427 msic->irq_base = devm_request_and_ioremap(&pdev->dev, res); 428 msic->irq_base = devm_ioremap_resource(&pdev->dev, res);
428 if (!msic->irq_base) { 429 if (IS_ERR(msic->irq_base))
429 dev_err(&pdev->dev, "failed to map SRAM memory\n"); 430 return PTR_ERR(msic->irq_base);
430 return -ENOMEM;
431 }
432 431
433 platform_set_drvdata(pdev, msic); 432 platform_set_drvdata(pdev, msic);
434 433