diff options
Diffstat (limited to 'drivers/platform/x86/thinkpad_acpi.c')
| -rw-r--r-- | drivers/platform/x86/thinkpad_acpi.c | 19 | 
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 7b828680b21..62533c105da 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -297,7 +297,7 @@ struct ibm_init_struct {  	char param[32];  	int (*init) (struct ibm_init_struct *); -	mode_t base_procfs_mode; +	umode_t base_procfs_mode;  	struct ibm_struct *data;  }; @@ -2456,8 +2456,9 @@ static int hotkey_kthread(void *data)  	u32 poll_mask, event_mask;  	unsigned int si, so;  	unsigned long t; -	unsigned int change_detector, must_reset; +	unsigned int change_detector;  	unsigned int poll_freq; +	bool was_frozen;  	mutex_lock(&hotkey_thread_mutex); @@ -2488,14 +2489,14 @@ static int hotkey_kthread(void *data)  				t = 100;	/* should never happen... */  		}  		t = msleep_interruptible(t); -		if (unlikely(kthread_should_stop())) +		if (unlikely(kthread_freezable_should_stop(&was_frozen)))  			break; -		must_reset = try_to_freeze(); -		if (t > 0 && !must_reset) + +		if (t > 0 && !was_frozen)  			continue;  		mutex_lock(&hotkey_thread_data_mutex); -		if (must_reset || hotkey_config_change != change_detector) { +		if (was_frozen || hotkey_config_change != change_detector) {  			/* forget old state on thaw or config change */  			si = so;  			t = 0; @@ -2528,10 +2529,6 @@ exit:  static void hotkey_poll_stop_sync(void)  {  	if (tpacpi_hotkey_task) { -		if (frozen(tpacpi_hotkey_task) || -		    freezing(tpacpi_hotkey_task)) -			thaw_process(tpacpi_hotkey_task); -  		kthread_stop(tpacpi_hotkey_task);  		tpacpi_hotkey_task = NULL;  		mutex_lock(&hotkey_thread_mutex); @@ -8542,7 +8539,7 @@ static int __init ibm_init(struct ibm_init_struct *iibm)  		"%s installed\n", ibm->name);  	if (ibm->read) { -		mode_t mode = iibm->base_procfs_mode; +		umode_t mode = iibm->base_procfs_mode;  		if (!mode)  			mode = S_IRUGO;  |