| .. | .. |
|---|
| 172 | 172 | struct wake_lock wake_lock; |
|---|
| 173 | 173 | struct notifier_block fb_nb; |
|---|
| 174 | 174 | struct timer_list caltimer; |
|---|
| 175 | | - time_t rtc_base; |
|---|
| 175 | + time64_t rtc_base; |
|---|
| 176 | 176 | struct iio_channel *iio_chan; |
|---|
| 177 | 177 | struct notifier_block cable_cg_nb; |
|---|
| 178 | 178 | struct notifier_block cable_host_nb; |
|---|
| .. | .. |
|---|
| 303 | 303 | |
|---|
| 304 | 304 | static u64 get_boot_sec(void) |
|---|
| 305 | 305 | { |
|---|
| 306 | | - struct timespec ts; |
|---|
| 306 | + struct timespec64 ts; |
|---|
| 307 | 307 | |
|---|
| 308 | | - get_monotonic_boottime(&ts); |
|---|
| 308 | + ktime_get_boottime_ts64(&ts); |
|---|
| 309 | 309 | |
|---|
| 310 | 310 | return ts.tv_sec; |
|---|
| 311 | 311 | } |
|---|
| .. | .. |
|---|
| 1873 | 1873 | struct rk816_battery *di; |
|---|
| 1874 | 1874 | struct fb_event *evdata = data; |
|---|
| 1875 | 1875 | |
|---|
| 1876 | + if (event != FB_EVENT_BLANK) |
|---|
| 1877 | + return NOTIFY_DONE; |
|---|
| 1878 | + |
|---|
| 1876 | 1879 | di = container_of(nb, struct rk816_battery, fb_nb); |
|---|
| 1880 | + di->fb_blank = *(int *)evdata->data; |
|---|
| 1877 | 1881 | |
|---|
| 1878 | | - if (event == FB_EVENT_BLANK || event == FB_EARLY_EVENT_BLANK || |
|---|
| 1879 | | - event == FB_R_EARLY_EVENT_BLANK) |
|---|
| 1880 | | - di->fb_blank = *(int *)evdata->data; |
|---|
| 1881 | | - else |
|---|
| 1882 | | - di->fb_blank = 1; |
|---|
| 1883 | | - |
|---|
| 1884 | | - return 0; |
|---|
| 1882 | + return NOTIFY_OK; |
|---|
| 1885 | 1883 | } |
|---|
| 1886 | 1884 | |
|---|
| 1887 | 1885 | static int rk816_bat_register_fb_notify(struct rk816_battery *di) |
|---|
| .. | .. |
|---|
| 4352 | 4350 | return 0; |
|---|
| 4353 | 4351 | } |
|---|
| 4354 | 4352 | |
|---|
| 4355 | | -static time_t rk816_get_rtc_sec(void) |
|---|
| 4353 | +static time64_t rk816_get_rtc_sec(void) |
|---|
| 4356 | 4354 | { |
|---|
| 4357 | 4355 | int err; |
|---|
| 4358 | 4356 | struct rtc_time tm; |
|---|
| 4359 | | - struct timespec tv = { .tv_nsec = NSEC_PER_SEC >> 1, }; |
|---|
| 4360 | 4357 | struct rtc_device *rtc = rtc_class_open(CONFIG_RTC_HCTOSYS_DEVICE); |
|---|
| 4361 | | - time_t sec; |
|---|
| 4362 | 4358 | |
|---|
| 4363 | 4359 | err = rtc_read_time(rtc, &tm); |
|---|
| 4364 | 4360 | if (err) { |
|---|
| .. | .. |
|---|
| 4372 | 4368 | return 0; |
|---|
| 4373 | 4369 | } |
|---|
| 4374 | 4370 | |
|---|
| 4375 | | - rtc_tm_to_time(&tm, &tv.tv_sec); |
|---|
| 4376 | | - sec = tv.tv_sec; |
|---|
| 4377 | | - |
|---|
| 4378 | | - return sec; |
|---|
| 4371 | + return rtc_tm_to_time64(&tm); |
|---|
| 4379 | 4372 | } |
|---|
| 4380 | 4373 | |
|---|
| 4381 | 4374 | static int rk816_bat_rtc_sleep_sec(struct rk816_battery *di) |
|---|