Skip to contentSkip to conversation

question on rfkill_suspend

DISCUSSION Oliver Neukum 1 participant 1 message Apr 16, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

it seems like rfkill does not guarantee that it won't talk to suspended devices. Is that true? Should request that arrive for suspended devices be ignored or postponed?

Regards
Oliver

#ifdef CONFIG_PM
static int rfkill_suspend(struct device *dev, pm_message_t state)

{
	struct rfkill *rfkill = to_rfkill(dev);

	if (dev->power.power_state.event != state.event) {
		if (state.event & PM_EVENT_SLEEP) {
			mutex_lock(&rfkill->mutex);

			if (rfkill->state == RFKILL_STATE_ON)
				rfkill->toggle_radio(rfkill->data,
						     RFKILL_STATE_OFF);