summaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-04-15 13:38:07 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-04-15 13:40:33 -0700
commite07a8943b809730220a4aff911d2bce6991828f1 (patch)
treef2836a63be87b17a571151097402febba7b9e319 /drivers/input
parent39fbe5855737b2a2b8e097373951bbe1a4fdb345 (diff)
downloadop-kernel-dev-e07a8943b809730220a4aff911d2bce6991828f1.zip
op-kernel-dev-e07a8943b809730220a4aff911d2bce6991828f1.tar.gz
Input: apbps2 - 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> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/serio/apbps2.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/input/serio/apbps2.c b/drivers/input/serio/apbps2.c
index 2c14e6f..17e01a8 100644
--- a/drivers/input/serio/apbps2.c
+++ b/drivers/input/serio/apbps2.c
@@ -147,11 +147,9 @@ static int apbps2_of_probe(struct platform_device *ofdev)
/* Find Device Address */
res = platform_get_resource(ofdev, IORESOURCE_MEM, 0);
- priv->regs = devm_request_and_ioremap(&ofdev->dev, res);
- if (!priv->regs) {
- dev_err(&ofdev->dev, "io-regs mapping failed\n");
- return -EBUSY;
- }
+ priv->regs = devm_ioremap_resource(&ofdev->dev, res);
+ if (IS_ERR(priv->regs))
+ return PTR_ERR(priv->regs);
/* Reset hardware, disable interrupt */
iowrite32be(0, &priv->regs->ctrl);
OpenPOWER on IntegriCloud