Skip to content

Commit

Permalink
Merge branch 'fortglx/3.13/time' of git://git.linaro.org/people/jstul…
Browse files Browse the repository at this point in the history
…tz/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: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Thomas Gleixner committed Oct 24, 2013
2 parents 3353652 + 891292a commit 77748e6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions kernel/time/alarmtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

if (!alarmtimer_get_rtcdev())
return -ENOTSUPP;
return -EINVAL;

return hrtimer_get_res(baseid, tp);
}
Expand All @@ -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)];

if (!alarmtimer_get_rtcdev())
return -ENOTSUPP;
return -EINVAL;

*tp = ktime_to_timespec(base->gettime());
return 0;
Expand Down
2 changes: 1 addition & 1 deletion kernel/time/clockevents.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ static ssize_t sysfs_unbind_tick_dev(struct device *dev,
const char *buf, size_t count)
{
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;

if (ret < 0)
Expand Down
2 changes: 1 addition & 1 deletion kernel/time/clocksource.c
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ sysfs_show_current_clocksources(struct device *dev,
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;

Expand Down
2 changes: 1 addition & 1 deletion kernel/time/tick-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extern void tick_install_replacement(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
Expand Down
3 changes: 2 additions & 1 deletion kernel/time/timekeeping.c
Original file line number Diff line number Diff line change
Expand Up @@ -1613,9 +1613,10 @@ void get_xtime_and_monotonic_and_sleep_offset(struct timespec *xtim,
* ktime_get_update_offsets - hrtimer helper
* @offs_real: pointer to storage for monotonic -> realtime 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
* 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 *offs_tai)
Expand Down

0 comments on commit 77748e6

Please sign in to comment.