diff options
Diffstat (limited to 'drivers/rtc/rtc-ds1742.c')
-rw-r--r-- | drivers/rtc/rtc-ds1742.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-ds1742.c b/drivers/rtc/rtc-ds1742.c index 042630c90dd3..d84a448dd754 100644 --- a/drivers/rtc/rtc-ds1742.c +++ b/drivers/rtc/rtc-ds1742.c | |||
@@ -173,7 +173,7 @@ static int __devinit ds1742_rtc_probe(struct platform_device *pdev) | |||
173 | pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); | 173 | pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); |
174 | if (!pdata) | 174 | if (!pdata) |
175 | return -ENOMEM; | 175 | return -ENOMEM; |
176 | pdata->size = res->end - res->start + 1; | 176 | pdata->size = resource_size(res); |
177 | if (!devm_request_mem_region(&pdev->dev, res->start, pdata->size, | 177 | if (!devm_request_mem_region(&pdev->dev, res->start, pdata->size, |
178 | pdev->name)) | 178 | pdev->name)) |
179 | return -EBUSY; | 179 | return -EBUSY; |