return NULL;
}
-static struct clock_ops cmos_interface = {
+static const struct clock_ops cmos_interface = {
N_("Using direct ISA access to the clock"),
get_permissions_cmos,
read_hardware_clock_cmos,
/*
* return &cmos if cmos clock present, NULL otherwise.
*/
-struct clock_ops *probe_for_cmos_clock(void)
+const struct clock_ops *probe_for_cmos_clock(void)
{
return &cmos_interface;
}
static int open_rtc(const struct hwclock_control *ctl)
{
- static const char *fls[] = {
+ static const char * const fls[] = {
#ifdef __ia64__
"/dev/efirtc",
"/dev/misc/efirtc",
return rtc_dev_name;
}
-static struct clock_ops rtc_interface = {
+static const struct clock_ops rtc_interface = {
N_("Using the rtc interface to the clock."),
get_permissions_rtc,
read_hardware_clock_rtc,
};
/* return &rtc if /dev/rtc can be opened, NULL otherwise */
-struct clock_ops *probe_for_rtc_clock(const struct hwclock_control *ctl)
+const struct clock_ops *probe_for_rtc_clock(const struct hwclock_control *ctl)
{
const int rtc_fd = open_rtc(ctl);
UL_DEBUG_DEFINE_MASKNAMES(hwclock) = UL_DEBUG_EMPTY_MASKNAMES;
/* The struct that holds our hardware access routines */
-static struct clock_ops *ur;
+static const struct clock_ops *ur;
/* Maximal clock adjustment in seconds per day.
(adjtime() glibc call has 2145 seconds limit on i386, so it is good enough for us as well,
const char *(*get_device_path) (void);
};
-extern struct clock_ops *probe_for_cmos_clock(void);
-extern struct clock_ops *probe_for_rtc_clock(const struct hwclock_control *ctl);
+extern const struct clock_ops *probe_for_cmos_clock(void);
+extern const struct clock_ops *probe_for_rtc_clock(const struct hwclock_control *ctl);
/* hwclock.c */
extern double time_diff(struct timeval subtrahend, struct timeval subtractor);