posix-timers: Make posix_clocks immutable
authorChristoph Hellwig <hch@lst.de>
Fri, 26 May 2017 09:03:11 +0000 (12:03 +0300)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 27 May 2017 07:46:35 +0000 (09:46 +0200)
commitd3ba5a9a345b1243276f8a982e1bce557c2504fd
tree1642ba9e97ef835cc51f87fbad312f0af3a8f526
parent07903ada96139ced48f2f893fe57a26a8fbc6043
posix-timers: Make posix_clocks immutable

There are no more modular users providing a posix clock. The register
function is now pointless so the posix clock array can be initialized
statically at compile time and the array including the various k_clock
structs can be marked 'const'.

Inspired by changes in the Grsecurity patch set, but done proper.

[ tglx: Massaged changelog and fixed the POSIX_TIMER=n case ]

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Mike Travis <mike.travis@hpe.com>
Cc: Dimitri Sivanich <sivanich@hpe.com>
Link: http://lkml.kernel.org/r/20170526090311.3377-3-hch@lst.de
include/linux/posix-timers.h
kernel/time/alarmtimer.c
kernel/time/posix-clock.c
kernel/time/posix-cpu-timers.c
kernel/time/posix-timers.c