Commit 77748e63 authored by Thomas Gleixner's avatar Thomas Gleixner

Merge branch 'fortglx/3.13/time' of git://git.linaro.org/people/jstultz/linux into timers/core

* An improved ssize_t fix for sysfs_get_uname
* Alarmtimer return fix, since ENOTSUPP isn't exported to userland
* Comment typo fixes
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parents 3353652c 891292a7
...@@ -490,7 +490,7 @@ static int alarm_clock_getres(const clockid_t which_clock, struct timespec *tp) ...@@ -490,7 +490,7 @@ static int alarm_clock_getres(const clockid_t which_clock, struct timespec *tp)
clockid_t baseid = alarm_bases[clock2alarm(which_clock)].base_clockid; clockid_t baseid = alarm_bases[clock2alarm(which_clock)].base_clockid;
if (!alarmtimer_get_rtcdev()) if (!alarmtimer_get_rtcdev())
return -ENOTSUPP; return -EINVAL;
return hrtimer_get_res(baseid, tp); return hrtimer_get_res(baseid, tp);
} }
...@@ -507,7 +507,7 @@ static int alarm_clock_get(clockid_t which_clock, struct timespec *tp) ...@@ -507,7 +507,7 @@ static int alarm_clock_get(clockid_t which_clock, struct timespec *tp)
struct alarm_base *base = &alarm_bases[clock2alarm(which_clock)]; struct alarm_base *base = &alarm_bases[clock2alarm(which_clock)];
if (!alarmtimer_get_rtcdev()) if (!alarmtimer_get_rtcdev())
return -ENOTSUPP; return -EINVAL;
*tp = ktime_to_timespec(base->gettime()); *tp = ktime_to_timespec(base->gettime());
return 0; return 0;
......
...@@ -584,7 +584,7 @@ static ssize_t sysfs_unbind_tick_dev(struct device *dev, ...@@ -584,7 +584,7 @@ static ssize_t sysfs_unbind_tick_dev(struct device *dev,
const char *buf, size_t count) const char *buf, size_t count)
{ {
char name[CS_NAME_LEN]; char name[CS_NAME_LEN];
size_t ret = sysfs_get_uname(buf, name, count); ssize_t ret = sysfs_get_uname(buf, name, count);
struct clock_event_device *ce; struct clock_event_device *ce;
if (ret < 0) if (ret < 0)
......
...@@ -909,7 +909,7 @@ sysfs_show_current_clocksources(struct device *dev, ...@@ -909,7 +909,7 @@ sysfs_show_current_clocksources(struct device *dev,
return count; return count;
} }
size_t sysfs_get_uname(const char *buf, char *dst, size_t cnt) ssize_t sysfs_get_uname(const char *buf, char *dst, size_t cnt)
{ {
size_t ret = cnt; size_t ret = cnt;
......
...@@ -31,7 +31,7 @@ extern void tick_install_replacement(struct clock_event_device *dev); ...@@ -31,7 +31,7 @@ extern void tick_install_replacement(struct clock_event_device *dev);
extern void clockevents_shutdown(struct clock_event_device *dev); extern void clockevents_shutdown(struct clock_event_device *dev);
extern size_t sysfs_get_uname(const char *buf, char *dst, size_t cnt); extern ssize_t sysfs_get_uname(const char *buf, char *dst, size_t cnt);
/* /*
* NO_HZ / high resolution timer shared code * NO_HZ / high resolution timer shared code
......
...@@ -1613,9 +1613,10 @@ void get_xtime_and_monotonic_and_sleep_offset(struct timespec *xtim, ...@@ -1613,9 +1613,10 @@ void get_xtime_and_monotonic_and_sleep_offset(struct timespec *xtim,
* ktime_get_update_offsets - hrtimer helper * ktime_get_update_offsets - hrtimer helper
* @offs_real: pointer to storage for monotonic -> realtime offset * @offs_real: pointer to storage for monotonic -> realtime offset
* @offs_boot: pointer to storage for monotonic -> boottime offset * @offs_boot: pointer to storage for monotonic -> boottime offset
* @offs_tai: pointer to storage for monotonic -> clock tai offset
* *
* Returns current monotonic time and updates the offsets * Returns current monotonic time and updates the offsets
* Called from hrtimer_interupt() or retrigger_next_event() * Called from hrtimer_interrupt() or retrigger_next_event()
*/ */
ktime_t ktime_get_update_offsets(ktime_t *offs_real, ktime_t *offs_boot, ktime_t ktime_get_update_offsets(ktime_t *offs_real, ktime_t *offs_boot,
ktime_t *offs_tai) ktime_t *offs_tai)
......
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