Reduce code duplication by creating ctl_set_res_ua() helper.
Convert persis_offset from global variable to softc field.