lkml.org 
[lkml]   [2014]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] rtc: rtc-jz4740: Use devm_ioremap_resource()
On 02/07/2014 08:58 AM, Jingoo Han wrote:
[...]
> - rtc->base = devm_ioremap_nocache(&pdev->dev, rtc->mem->start,
> - resource_size(rtc->mem));
> - if (!rtc->base) {
> - dev_err(&pdev->dev, "Failed to ioremap mmio memory\n");
> - return -EBUSY;
> - }
> + mem->flags &= ~IORESOURCE_CACHEABLE;

You shouldn't be modifying the resource, strictly speaking it is not owned
by the device. And IORESOURCE_CACHEABLE is never set for this device anyway.

> + rtc->base = devm_ioremap_resource(&pdev->dev, mem);
> + if (IS_ERR(rtc->base))
> + return PTR_ERR(rtc->base);
>
> spin_lock_init(&rtc->lock);
>
>



\
 
 \ /
  Last update: 2014-02-07 10:01    [W:0.061 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site