From: Alexander Shiyan Date: Fri, 8 Aug 2014 21:20:07 +0000 (-0700) Subject: drivers/rtc/rtc-ds1742.c: revert "drivers/rtc/rtc-ds1742.c: remove redundant of_match... X-Git-Tag: v4.9.8~5926^2~169 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3710f597aca5af4f605cda9793a8b2f0a42bc29a;p=platform%2Fkernel%2Flinux-rpi3.git drivers/rtc/rtc-ds1742.c: revert "drivers/rtc/rtc-ds1742.c: remove redundant of_match_ptr() helper" Commit 5516f0971793 ("drivers/rtc/rtc-ds1742.c: remove redundant of_match_ptr() helper") has description as: "'ds1742_rtc_of_match' is always compiled in. Hence the helper macro is not needed". It is not true, of_match_ptr() macro makes of_device_id parameter unused and this constant is declared with __maybe_unused attribute, so normally this variable should be discarded by linker. This patch revers this commit, since there are no reason to compile of_device_id constant for non-DT systems. Signed-off-by: Alexander Shiyan Cc: Alessandro Zummo Cc: Sachin Kamat Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/rtc/rtc-ds1742.c b/drivers/rtc/rtc-ds1742.c index c6b2191..9822715 100644 --- a/drivers/rtc/rtc-ds1742.c +++ b/drivers/rtc/rtc-ds1742.c @@ -231,7 +231,7 @@ static struct platform_driver ds1742_rtc_driver = { .driver = { .name = "rtc-ds1742", .owner = THIS_MODULE, - .of_match_table = ds1742_rtc_of_match, + .of_match_table = of_match_ptr(ds1742_rtc_of_match), }, };