static void housekeeping_disable(struct zd_mac *mac) { dev_dbg_f(zd_mac_dev(mac), "\n"); cancel_rearming_delayed_workqueue(zd_workqueue, &mac->housekeeping.link_led_work); zd_chip_control_leds(&mac->chip, LED_OFF); }
static void link_led_handler(struct work_struct *work) { struct zd_mac *mac = container_of(work, struct zd_mac, housekeeping.link_led_work.work); struct zd_chip *chip = &mac->chip; int is_associated; int r; spin_lock_irq(&mac->lock); is_associated = mac->associated; spin_unlock_irq(&mac->lock); r = zd_chip_control_leds(chip, is_associated ? LED_ASSOCIATED : LED_SCANNING); if (r) dev_dbg_f(zd_mac_dev(mac), "zd_chip_control_leds error %d\n", r); queue_delayed_work(zd_workqueue, &mac->housekeeping.link_led_work, LINK_LED_WORK_DELAY); }