diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2017-01-11 10:16:58 +0000 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2017-01-12 12:33:58 +0100 |
commit | d748c9810be2d6a570aad0390463c9ac4336b161 (patch) | |
tree | c1276c1fb30c9b839048bc2dd371dcb173602189 /drivers/rtc/rtc-ab-b5ze-s3.c | |
parent | 8bc57e7f11971665b4a7886305dffcd27213d718 (diff) |
rtc: armada38x: make struct rtc_class_ops const
Armada38x wants to modify its rtc_class_ops to remove the interrupt
handling when there is no usable interrupt, but this means we leave
function pointers in writable memory.
Since rtc_class_ops is small, arrange to have two instances, one for
when we have interrupts, and one for when we have none, both marked
const. This allows the compiler to place them in read-only memory,
which is better than placing them in __ro_after_init.
Thanks to Bhumika Goyal <bhumirks@gmail.com> for pointing out that
the structure was writable and submitting a patch to add
__ro_after_init.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc/rtc-ab-b5ze-s3.c')
0 files changed, 0 insertions, 0 deletions