aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/serio/apbps2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/serio/apbps2.c')
-rw-r--r--drivers/input/serio/apbps2.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/input/serio/apbps2.c b/drivers/input/serio/apbps2.c
index 2c14e6fa64c..98be824544a 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);
@@ -205,7 +203,7 @@ static int apbps2_of_remove(struct platform_device *of_dev)
return 0;
}
-static struct of_device_id apbps2_of_match[] = {
+static const struct of_device_id apbps2_of_match[] = {
{ .name = "GAISLER_APBPS2", },
{ .name = "01_060", },
{}