Re: [PATCH] hwmon: adt7470: Allow faster removal

2016-09-08 Thread Guenter Roeck
On 09/06/2016 03:49 PM, Joshua Scott wrote: adt7470_remove will wait for the update thread to complete before returning. This had a worst-case time of up to the user-configurable auto_update_interval. Replace msleep_interruptible with set_current_state and schedule_timeout so that kthread_stop

[PATCH] hwmon: adt7470: Allow faster removal

2016-09-06 Thread Joshua Scott
adt7470_remove will wait for the update thread to complete before returning. This had a worst-case time of up to the user-configurable auto_update_interval. Replace msleep_interruptible with set_current_state and schedule_timeout so that kthread_stop will interrupt the sleep. Signed-off-by:

Re: [PATCH] hwmon: adt7470: Allow faster removal

2016-09-02 Thread Jean Delvare
Hi Chris, On Thu, 1 Sep 2016 21:08:54 +, Chris Packham wrote: > On 09/02/2016 12:12 AM, Guenter Roeck wrote: > > This puts a heavy burden on the system, forcing it to run every ms, just for > > the unlikely case of driver removal. Why is quick removal so important ? > > If it is, we'll have

Re: [PATCH] hwmon: adt7470: Allow faster removal

2016-09-01 Thread Chris Packham
Hi Guenter, Jean, On 09/02/2016 12:12 AM, Guenter Roeck wrote: > On 08/31/2016 10:17 PM, Joshua Scott wrote: >> adt7470_remove will wait for the update thread to complete before >> returning. This has a worst-case time of up to the user-configurable >> auto_update_interval. >> >> Break this delay

Re: [PATCH] hwmon: adt7470: Allow faster removal

2016-09-01 Thread Guenter Roeck
On 08/31/2016 10:17 PM, Joshua Scott wrote: adt7470_remove will wait for the update thread to complete before returning. This has a worst-case time of up to the user-configurable auto_update_interval. Break this delay into smaller slices to allow the thread to exit quickly when adt7470_remove

Re: [PATCH] hwmon: adt7470: Allow faster removal

2016-09-01 Thread Jean Delvare
Hi Joshua, On Thu, 1 Sep 2016 17:17:21 +1200, Joshua Scott wrote: > adt7470_remove will wait for the update thread to complete before > returning. This has a worst-case time of up to the user-configurable > auto_update_interval. > > Break this delay into smaller slices to allow the thread to

[PATCH] hwmon: adt7470: Allow faster removal

2016-08-31 Thread Joshua Scott
adt7470_remove will wait for the update thread to complete before returning. This has a worst-case time of up to the user-configurable auto_update_interval. Break this delay into smaller slices to allow the thread to exit quickly when adt7470_remove is called. Signed-off-by: Joshua Scott