summaryrefslogtreecommitdiff
path: root/drivers/input/misc/cobalt_btns.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/misc/cobalt_btns.c')
-rw-r--r--drivers/input/misc/cobalt_btns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/misc/cobalt_btns.c b/drivers/input/misc/cobalt_btns.c
index d114d3a9e1e9..ee73d7219c92 100644
--- a/drivers/input/misc/cobalt_btns.c
+++ b/drivers/input/misc/cobalt_btns.c
@@ -116,7 +116,7 @@ static int __devinit cobalt_buttons_probe(struct platform_device *pdev)
}
bdev->poll_dev = poll_dev;
- bdev->reg = ioremap(res->start, res->end - res->start + 1);
+ bdev->reg = ioremap(res->start, resource_size(res));
dev_set_drvdata(&pdev->dev, bdev);
error = input_register_polled_device(poll_dev);