Skip to content

Commit

Permalink
drivers/rtc/rtc-ds1742.c: revert "drivers/rtc/rtc-ds1742.c: remove re…
Browse files Browse the repository at this point in the history
…dundant of_match_ptr() helper"

Commit 5516f09 ("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 <shc_work@mail.ru>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
shcgit authored and torvalds committed Aug 8, 2014
1 parent 441fb76 commit 3710f59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-ds1742.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
},
};

Expand Down

0 comments on commit 3710f59

Please sign in to comment.