Lines Matching refs:retval
34 ssize_t retval; in date_show() local
37 retval = rtc_read_time(to_rtc_device(dev), &tm); in date_show()
38 if (retval) in date_show()
39 return retval; in date_show()
48 ssize_t retval; in time_show() local
51 retval = rtc_read_time(to_rtc_device(dev), &tm); in time_show()
52 if (retval) in time_show()
53 return retval; in time_show()
62 ssize_t retval; in since_epoch_show() local
65 retval = rtc_read_time(to_rtc_device(dev), &tm); in since_epoch_show()
66 if (retval == 0) { in since_epoch_show()
70 retval = sprintf(buf, "%lld\n", time); in since_epoch_show()
73 return retval; in since_epoch_show()
129 ssize_t retval; in wakealarm_show() local
141 retval = rtc_read_alarm(to_rtc_device(dev), &alm); in wakealarm_show()
142 if (retval == 0 && alm.enabled) { in wakealarm_show()
144 retval = sprintf(buf, "%lld\n", alarm); in wakealarm_show()
147 return retval; in wakealarm_show()
154 ssize_t retval; in wakealarm_store() local
165 retval = rtc_read_time(rtc, &alm.time); in wakealarm_store()
166 if (retval < 0) in wakealarm_store()
167 return retval; in wakealarm_store()
180 retval = kstrtos64(buf_ptr, 0, &alarm); in wakealarm_store()
181 if (retval) in wakealarm_store()
182 return retval; in wakealarm_store()
190 retval = rtc_read_alarm(rtc, &alm); in wakealarm_store()
191 if (retval < 0) in wakealarm_store()
192 return retval; in wakealarm_store()
212 retval = rtc_set_alarm(rtc, &alm); in wakealarm_store()
213 return (retval < 0) ? retval : n; in wakealarm_store()
220 ssize_t retval; in offset_show() local
223 retval = rtc_read_offset(to_rtc_device(dev), &offset); in offset_show()
224 if (retval == 0) in offset_show()
225 retval = sprintf(buf, "%ld\n", offset); in offset_show()
227 return retval; in offset_show()
234 ssize_t retval; in offset_store() local
237 retval = kstrtol(buf, 10, &offset); in offset_store()
238 if (retval == 0) in offset_store()
239 retval = rtc_set_offset(to_rtc_device(dev), offset); in offset_store()
241 return (retval < 0) ? retval : n; in offset_store()