[PATCH v2 3/7] rtc: sa1100: use ioremap to map registers
Russell King - ARM Linux
linux at arm.linux.org.uk
Thu Feb 23 05:26:27 EST 2012
On Thu, Feb 23, 2012 at 11:28:29AM +0800, Haojian Zhuang wrote:
> static int sa1100_rtc_read_time(struct device *dev, struct rtc_time *tm)
> {
> - rtc_time_to_tm(RCNR, tm);
> + struct sa1100_rtc *info = dev_get_drvdata(dev);
> + unsigned long rcnr;
> +
> + rcnr = readl_relaxed(info->reg_rcnr);
> + rtc_time_to_tm(rcnr, tm);
Just one nit - this could be:
struct sa1100_rtc *info = dev_get_drvdata(dev);
rtc_time_to_tm(readl_relaxed(info->reg_rcnr), tm);
More information about the linux-arm-kernel
mailing list