diff options
Diffstat (limited to 'drivers/input/keyboard/spear-keyboard.c')
-rw-r--r-- | drivers/input/keyboard/spear-keyboard.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/input/keyboard/spear-keyboard.c b/drivers/input/keyboard/spear-keyboard.c index 695d237417d6..cb1e8f614631 100644 --- a/drivers/input/keyboard/spear-keyboard.c +++ b/drivers/input/keyboard/spear-keyboard.c @@ -228,11 +228,9 @@ static int spear_kbd_probe(struct platform_device *pdev) kbd->suspended_rate = pdata->suspended_rate; } - kbd->io_base = devm_request_and_ioremap(&pdev->dev, res); - if (!kbd->io_base) { - dev_err(&pdev->dev, "request-ioremap failed for kbd_region\n"); - return -ENOMEM; - } + kbd->io_base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(kbd->io_base)) + return PTR_ERR(kbd->io_base); kbd->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(kbd->clk)) |