sja1000: don't use [delayed_]work_pending()
There's no need to test whether a (delayed) work item in pending before queueing, flushing or cancelling it. Most uses are unnecessary and quite a few of them are buggy. Remove unnecessary pending tests from sja1000. Only compile tested. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: "David S. Miller" <davem@davemloft.net> Cc: Wolfgang Grandegger <wg@grandegger.com> Cc: netdev@vger.kernel.org
This commit is contained in:
parent
ecccd1248d
commit
1cab3f9fcc
@ -339,8 +339,7 @@ static void peak_pciec_set_leds(struct peak_pciec_card *card, u8 led_mask, u8 s)
|
||||
*/
|
||||
static void peak_pciec_start_led_work(struct peak_pciec_card *card)
|
||||
{
|
||||
if (!delayed_work_pending(&card->led_work))
|
||||
schedule_delayed_work(&card->led_work, HZ);
|
||||
schedule_delayed_work(&card->led_work, HZ);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user