diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-04-15 16:38:07 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-04-15 16:40:33 -0400 |
commit | e07a8943b809730220a4aff911d2bce6991828f1 (patch) | |
tree | f2836a63be87b17a571151097402febba7b9e319 /drivers/input/serio | |
parent | 39fbe5855737b2a2b8e097373951bbe1a4fdb345 (diff) |
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/serio')
-rw-r--r-- | drivers/input/serio/apbps2.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/input/serio/apbps2.c b/drivers/input/serio/apbps2.c index 2c14e6fa64c2..17e01a807ddc 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) | |||
147 | 147 | ||
148 | /* Find Device Address */ | 148 | /* Find Device Address */ |
149 | res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); | 149 | res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); |
150 | priv->regs = devm_request_and_ioremap(&ofdev->dev, res); | 150 | priv->regs = devm_ioremap_resource(&ofdev->dev, res); |
151 | if (!priv->regs) { | 151 | if (IS_ERR(priv->regs)) |
152 | dev_err(&ofdev->dev, "io-regs mapping failed\n"); | 152 | return PTR_ERR(priv->regs); |
153 | return -EBUSY; | ||
154 | } | ||
155 | 153 | ||
156 | /* Reset hardware, disable interrupt */ | 154 | /* Reset hardware, disable interrupt */ |
157 | iowrite32be(0, &priv->regs->ctrl); | 155 | iowrite32be(0, &priv->regs->ctrl); |