FRanK CLysTer
BSOD
- Messages
- 6
HElp WHEnEVer I TypE It lOOKs LikE THiS. ThE fULLstOP is Ok BCauSE i USe tHe onE On THe NUm PAd.
IT is FUKCEd.
ANy iDEaS?
IT is FUKCEd.
ANy iDEaS?
@@ -2282,12 +2298,17 @@ static int hotkey_kthread(void *data)
mutex_lock(&hotkey_thread_data_mutex);
change_detector = hotkey_config_change;
mask = hotkey_source_mask & hotkey_mask;
+ poll_freq = hotkey_poll_freq;
mutex_unlock(&hotkey_thread_data_mutex);
hotkey_read_nvram(&s[so], mask);
- while (!kthread_should_stop() && hotkey_poll_freq) {
- if (t == 0)
- t = 1000/hotkey_poll_freq;
+ while (!kthread_should_stop()) {
+ if (t == 0) {
+ if (likely(poll_freq))
+ t = 1000/poll_freq;
+ else
+ t = 100; /* should never happen... */
+ }
t = msleep_interruptible(t);
if (unlikely(kthread_should_stop()))
break;
@@ -2303,6 +2324,7 @@ static int hotkey_kthread(void *data)
change_detector = hotkey_config_change;
}
mask = hotkey_source_mask & hotkey_mask;
+ poll_freq = hotkey_poll_freq;
mutex_unlock(&hotkey_thread_data_mutex);
if (likely(mask)) {
@@ -2322,6 +2344,7 @@ exit:
return 0;
}