Rework a little bit the end cases in check_state_change
Rework a little bit the end cases in check_state_change

The new version is equivalent but a little bit clearer.

Change-Id: I8606a3e10007d60bac895f0ad12f4fd40f2fb2c7
Signed-off-by: Patrick Porlan <6b7a5b9114e07d350ffba0c179039885a7e82794@intel.com>

01org/android-iio-sensors-hal,01org/android-iio-sensors-hal