staging: unisys: refactor my_device_changestate()