It is useful for debugging when we know if something disabled
the in-kernel rfkill input handler.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
#ifdef CONFIG_RFKILL_INPUT
if (data->input_handler)
- atomic_dec(&rfkill_input_disabled);
+ if (atomic_dec_return(&rfkill_input_disabled) == 0)
+ printk(KERN_DEBUG "rfkill: input handler enabled\n");
#endif
kfree(data);
mutex_lock(&data->mtx);
if (!data->input_handler) {
- atomic_inc(&rfkill_input_disabled);
+ if (atomic_inc_return(&rfkill_input_disabled) == 1)
+ printk(KERN_DEBUG "rfkill: input handler disabled\n");
data->input_handler = true;
}