| .. | .. |
|---|
| 1 | | -/* |
|---|
| 2 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 3 | | - * under the terms of the GNU General Public License version 2 as published by |
|---|
| 4 | | - * the Free Software Foundation. |
|---|
| 5 | | - * |
|---|
| 6 | | - */ |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
|---|
| 7 | 2 | #include <linux/rtc.h> |
|---|
| 8 | 3 | #include <linux/time.h> |
|---|
| 9 | 4 | |
|---|
| .. | .. |
|---|
| 35 | 30 | if (!rtc) |
|---|
| 36 | 31 | goto out_err; |
|---|
| 37 | 32 | |
|---|
| 38 | | - if (!rtc->ops || (!rtc->ops->set_time && !rtc->ops->set_mmss64 && |
|---|
| 39 | | - !rtc->ops->set_mmss)) |
|---|
| 33 | + if (!rtc->ops || !rtc->ops->set_time) |
|---|
| 40 | 34 | goto out_close; |
|---|
| 41 | 35 | |
|---|
| 42 | 36 | /* Compute the value of tv_nsec we require the caller to supply in |
|---|
| .. | .. |
|---|
| 58 | 52 | |
|---|
| 59 | 53 | rtc_time64_to_tm(to_set.tv_sec, &tm); |
|---|
| 60 | 54 | |
|---|
| 61 | | - /* rtc_hctosys exclusively uses UTC, so we call set_time here, not |
|---|
| 62 | | - * set_mmss. |
|---|
| 63 | | - */ |
|---|
| 64 | 55 | err = rtc_set_time(rtc, &tm); |
|---|
| 65 | 56 | |
|---|
| 66 | 57 | out_close: |
|---|