elan: Only queue state changes once

The driver would warn about the fact that a state change is queued, but
still queue it a second time. This would result in deactivation to run
twice.

See: #216
This commit is contained in:
Benjamin Berg 2020-05-22 17:29:00 +02:00 committed by Benjamin Berg
parent 32bdd8d5c4
commit 40ed353666

View file

@ -1015,7 +1015,10 @@ dev_change_state (FpImageDevice *dev, FpiImageDeviceState state)
state = FPI_IMAGE_DEVICE_STATE_INACTIVE; state = FPI_IMAGE_DEVICE_STATE_INACTIVE;
if (self->dev_state_next == state) if (self->dev_state_next == state)
{
fp_dbg ("change to state %d already queued", state); fp_dbg ("change to state %d already queued", state);
return;
}
switch (state) switch (state)
{ {