diff options
author | Rikard Falkeborn <[email protected]> | 2020-09-13 14:26:44 +0200 |
---|---|---|
committer | Alexandre Belloni <[email protected]> | 2020-09-15 11:21:50 +0200 |
commit | d0a3b65052f041852c855ea1135659770ba0bc09 (patch) | |
tree | ced936b407b2dceb28b1735fb32c4577a0845f04 | |
parent | 2fc1af3095af5cbcd8fc406610dc196b62e3ed21 (diff) |
rtc: st-lpc: Constify st_rtc_ops
The only usage of st_rtc_ops is to assign its address to the ops field
in the rtc_device struct. which is a const pointer. Make it const to
allow the compiler to put it in read-only memory.
Signed-off-by: Rikard Falkeborn <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
-rw-r--r-- | drivers/rtc/rtc-st-lpc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-st-lpc.c b/drivers/rtc/rtc-st-lpc.c index 51041dc08af4..0c65448b85ee 100644 --- a/drivers/rtc/rtc-st-lpc.c +++ b/drivers/rtc/rtc-st-lpc.c @@ -173,7 +173,7 @@ static int st_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *t) return 0; } -static struct rtc_class_ops st_rtc_ops = { +static const struct rtc_class_ops st_rtc_ops = { .read_time = st_rtc_read_time, .set_time = st_rtc_set_time, .read_alarm = st_rtc_read_alarm, |