pwm: Ensure pwm_apply_state() doesn't modify the state argument