Beispiel #1
0
static void blink_callback(struct work_struct *blink_work)
{
	if (bln_led_state) {
		if (--blink_count == 0) {
			pr_notice("%s: notification led time out\n", __FUNCTION__);
			disable_led_notification();
			return;
		}
		bln_led_off();
	} else {
		bln_led_on();
	}
}
Beispiel #2
0
static void disable_led_notification(void)
{
	if (bln_ongoing) {
		bln_blink_stop();
		bln_led_off();
		bln_imp->disable();

		bln_ongoing = false;

		pr_debug("%s: success\n", __FUNCTION__);
	} else {
		pr_notice("%s: fail (ongoing=%c\n", __FUNCTION__, bln_ongoing);
	}
}
static void blink_callback(struct work_struct *blink_work)
{
	mutex_lock(&bln_mutex);
	if (bln_led_state) {
		if (--blink_count == 0) {
			pr_notice("%s: notification led time out\n", __FUNCTION__);
			disable_led_notification();
			goto unlock;
		}
		bln_led_off();
	} else {
		bln_led_on();
	}

unlock:
	mutex_unlock(&bln_mutex);
}