Commit 58f9a600 authored by Russell King's avatar Russell King

[ARM] Simplify /proc/driver/rtc procfs interface.

The read method doesn't need to calculate eof/start offsets.
Signed-off-by: default avatarRussell King <rmk@arm.linux.org.uk>
parent 44f5ca29
......@@ -423,7 +423,6 @@ static int rtc_read_proc(char *page, char **start, off_t off, int count, int *eo
struct rtc_wkalrm alrm;
struct rtc_time tm;
char *p = page;
int len;
rtc_read_time(ops, &tm);
......@@ -472,13 +471,7 @@ static int rtc_read_proc(char *page, char **start, off_t off, int count, int *eo
if (ops->proc)
p += ops->proc(p);
len = (p - page) - off;
if (len < 0)
len = 0;
*eof = len <= count;
*start = page + off;
return len;
return p - page;
}
int register_rtc(struct rtc_ops *ops)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment