diff options
Diffstat (limited to 'drivers/rtc/rtc-ds1511.c')
-rw-r--r-- | drivers/rtc/rtc-ds1511.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-ds1511.c b/drivers/rtc/rtc-ds1511.c index fbabc773dded..586c244a05d8 100644 --- a/drivers/rtc/rtc-ds1511.c +++ b/drivers/rtc/rtc-ds1511.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/rtc.h> | 23 | #include <linux/rtc.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/module.h> | ||
26 | 27 | ||
27 | #define DRV_VERSION "0.6" | 28 | #define DRV_VERSION "0.6" |
28 | 29 | ||
@@ -490,7 +491,7 @@ ds1511_rtc_probe(struct platform_device *pdev) | |||
490 | pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); | 491 | pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); |
491 | if (!pdata) | 492 | if (!pdata) |
492 | return -ENOMEM; | 493 | return -ENOMEM; |
493 | pdata->size = res->end - res->start + 1; | 494 | pdata->size = resource_size(res); |
494 | if (!devm_request_mem_region(&pdev->dev, res->start, pdata->size, | 495 | if (!devm_request_mem_region(&pdev->dev, res->start, pdata->size, |
495 | pdev->name)) | 496 | pdev->name)) |
496 | return -EBUSY; | 497 | return -EBUSY; |