@@ -66,11 +66,6 @@ bool boot_hpet_disable;
66
66
bool hpet_force_user ;
67
67
static bool hpet_verbose ;
68
68
69
- /*
70
- * The HPET clock event device wrapped in a channel for conversion
71
- */
72
- static struct hpet_channel hpet_channel0 ;
73
-
74
69
static inline
75
70
struct hpet_channel * clockevent_to_channel (struct clock_event_device * evt )
76
71
{
@@ -904,7 +899,7 @@ int __init hpet_enable(void)
904
899
clocksource_register_hz (& clocksource_hpet , (u32 )hpet_freq );
905
900
906
901
if (id & HPET_ID_LEGSUP ) {
907
- hpet_legacy_clockevent_register (& hpet_channel0 );
902
+ hpet_legacy_clockevent_register (& hpet_base . channels [ 0 ] );
908
903
hpet_base .channels [0 ].mode = HPET_MODE_LEGACY ;
909
904
if (IS_ENABLED (CONFIG_HPET_EMULATE_RTC ))
910
905
hpet_base .channels [1 ].mode = HPET_MODE_LEGACY ;
@@ -1089,7 +1084,7 @@ int hpet_rtc_timer_init(void)
1089
1084
return 0 ;
1090
1085
1091
1086
if (!hpet_default_delta ) {
1092
- struct clock_event_device * evt = & hpet_channel0 .evt ;
1087
+ struct clock_event_device * evt = & hpet_base . channels [ 0 ] .evt ;
1093
1088
uint64_t clc ;
1094
1089
1095
1090
clc = (uint64_t ) evt -> mult * NSEC_PER_SEC ;
@@ -1187,7 +1182,7 @@ int hpet_set_periodic_freq(unsigned long freq)
1187
1182
if (freq <= DEFAULT_RTC_INT_FREQ ) {
1188
1183
hpet_pie_limit = DEFAULT_RTC_INT_FREQ / freq ;
1189
1184
} else {
1190
- struct clock_event_device * evt = & hpet_channel0 .evt ;
1185
+ struct clock_event_device * evt = & hpet_base . channels [ 0 ] .evt ;
1191
1186
1192
1187
clc = (uint64_t ) evt -> mult * NSEC_PER_SEC ;
1193
1188
do_div (clc , freq );
0 commit comments