diff options
author | Richard Cochran <richard.cochran@omicron.at> | 2011-02-01 08:50:58 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-02-02 09:28:11 -0500 |
commit | 1e6d767924c74929c0cfe839ae8f37bcee9e544e (patch) | |
tree | 4ace06971e2b3519e556bea2f7e3e999e860eedd /include/linux/posix-timers.h | |
parent | 7cf37e87dd2cfa17a64f28ea7f31eed4525f79e4 (diff) |
time: Correct the *settime* parameters
Both settimeofday() and clock_settime() promise with a 'const'
attribute not to alter the arguments passed in. This patch adds the
missing 'const' attribute into the various kernel functions
implementing these calls.
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Acked-by: John Stultz <johnstul@us.ibm.com>
LKML-Reference: <20110201134417.545698637@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/posix-timers.h')
-rw-r--r-- | include/linux/posix-timers.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h index 3e23844a6990..b2c14cbd47a6 100644 --- a/include/linux/posix-timers.h +++ b/include/linux/posix-timers.h | |||
@@ -69,7 +69,8 @@ struct k_itimer { | |||
69 | struct k_clock { | 69 | struct k_clock { |
70 | int res; /* in nanoseconds */ | 70 | int res; /* in nanoseconds */ |
71 | int (*clock_getres) (const clockid_t which_clock, struct timespec *tp); | 71 | int (*clock_getres) (const clockid_t which_clock, struct timespec *tp); |
72 | int (*clock_set) (const clockid_t which_clock, struct timespec * tp); | 72 | int (*clock_set) (const clockid_t which_clock, |
73 | const struct timespec *tp); | ||
73 | int (*clock_get) (const clockid_t which_clock, struct timespec * tp); | 74 | int (*clock_get) (const clockid_t which_clock, struct timespec * tp); |
74 | int (*timer_create) (struct k_itimer *timer); | 75 | int (*timer_create) (struct k_itimer *timer); |
75 | int (*nsleep) (const clockid_t which_clock, int flags, | 76 | int (*nsleep) (const clockid_t which_clock, int flags, |
@@ -89,7 +90,7 @@ void register_posix_clock(const clockid_t clock_id, struct k_clock *new_clock); | |||
89 | /* error handlers for timer_create, nanosleep and settime */ | 90 | /* error handlers for timer_create, nanosleep and settime */ |
90 | int do_posix_clock_nonanosleep(const clockid_t, int flags, struct timespec *, | 91 | int do_posix_clock_nonanosleep(const clockid_t, int flags, struct timespec *, |
91 | struct timespec __user *); | 92 | struct timespec __user *); |
92 | int do_posix_clock_nosettime(const clockid_t, struct timespec *tp); | 93 | int do_posix_clock_nosettime(const clockid_t, const struct timespec *tp); |
93 | 94 | ||
94 | /* function to call to trigger timer event */ | 95 | /* function to call to trigger timer event */ |
95 | int posix_timer_event(struct k_itimer *timr, int si_private); | 96 | int posix_timer_event(struct k_itimer *timr, int si_private); |