Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rtc: make of_device_ids const

of_device_ids (i.e. compatible strings and the respective data) are not
supposed to change at runtime. All functions working with of_device_ids
provided by <linux/of.h> work with const of_device_ids. This allows to
mark all struct of_device_id below drivers/rtc const, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Uwe Kleine-König and committed by
Linus Torvalds
a28885bc 78230477

+2 -2
+1 -1
drivers/rtc/rtc-isl12022.c
··· 274 274 } 275 275 276 276 #ifdef CONFIG_OF 277 - static struct of_device_id isl12022_dt_match[] = { 277 + static const struct of_device_id isl12022_dt_match[] = { 278 278 { .compatible = "isl,isl12022" }, 279 279 { }, 280 280 };
+1 -1
drivers/rtc/rtc-mpc5121.c
··· 401 401 } 402 402 403 403 #ifdef CONFIG_OF 404 - static struct of_device_id mpc5121_rtc_match[] = { 404 + static const struct of_device_id mpc5121_rtc_match[] = { 405 405 { .compatible = "fsl,mpc5121-rtc", }, 406 406 { .compatible = "fsl,mpc5200-rtc", }, 407 407 {},