r8169: improve rtl_schedule_task
The current implementation makes the implicit assumption that if a bit is set, then the work is scheduled already. Remove the need for this implicit assumption and call schedule_work() always. It will check internally whether the work is scheduled already. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e18958c6a2
commit
3f6ca6c739
@ -2228,8 +2228,8 @@ u16 rtl8168h_2_get_adc_bias_ioffset(struct rtl8169_private *tp)
|
||||
|
||||
static void rtl_schedule_task(struct rtl8169_private *tp, enum rtl_flag flag)
|
||||
{
|
||||
if (!test_and_set_bit(flag, tp->wk.flags))
|
||||
schedule_work(&tp->wk.work);
|
||||
set_bit(flag, tp->wk.flags);
|
||||
schedule_work(&tp->wk.work);
|
||||
}
|
||||
|
||||
static void rtl8169_init_phy(struct rtl8169_private *tp)
|
||||
|
Loading…
x
Reference in New Issue
Block a user