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 <[email protected]>
Acked-by: John Stultz <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
Richard Cochran 2011-02-01 13:50:58 +00:00 • committed by Thomas Gleixner
commit 1e6d767924
9 changed files with 18 additions and 15 deletions

View file

@ -192,7 +192,7 @@ static int common_clock_get(clockid_t which_clock, struct timespec *tp)
}
static inline int common_clock_set(const clockid_t which_clock,
struct timespec *tp)
const struct timespec *tp)
{
return do_sys_settimeofday(tp, NULL);
}
@ -928,7 +928,7 @@ void exit_itimers(struct signal_struct *sig)
}
/* Not available / possible... functions */
int do_posix_clock_nosettime(const clockid_t clockid, struct timespec *tp)
int do_posix_clock_nosettime(const clockid_t clockid, const struct timespec *tp)
{
return -EINVAL;
}