diff options
Diffstat (limited to 'drivers/rtc/rtc-ds1742.c')
-rw-r--r-- | drivers/rtc/rtc-ds1742.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-ds1742.c b/drivers/rtc/rtc-ds1742.c index 042630c90dd3..e3e0f92b60f0 100644 --- a/drivers/rtc/rtc-ds1742.c +++ b/drivers/rtc/rtc-ds1742.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/rtc.h> | 21 | #include <linux/rtc.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/module.h> | ||
24 | 25 | ||
25 | #define DRV_VERSION "0.4" | 26 | #define DRV_VERSION "0.4" |
26 | 27 | ||
@@ -173,7 +174,7 @@ static int __devinit ds1742_rtc_probe(struct platform_device *pdev) | |||
173 | pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); | 174 | pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); |
174 | if (!pdata) | 175 | if (!pdata) |
175 | return -ENOMEM; | 176 | return -ENOMEM; |
176 | pdata->size = res->end - res->start + 1; | 177 | pdata->size = resource_size(res); |
177 | if (!devm_request_mem_region(&pdev->dev, res->start, pdata->size, | 178 | if (!devm_request_mem_region(&pdev->dev, res->start, pdata->size, |
178 | pdev->name)) | 179 | pdev->name)) |
179 | return -EBUSY; | 180 | return -EBUSY; |