Commit de0a414
tg3: unconditionally select HWMON support when tg3 is enabled.
There is the seldom used corner case where HWMON=m at the same
time as TIGON3=y (typically randconfigs) which will cause a link
fail like:
drivers/built-in.o: In function `tg3_close':
tg3.c:(.text+0x16bd86): undefined reference to `hwmon_device_unregister'
drivers/built-in.o: In function `tg3_hwmon_open':
tg3.c:(.text+0x16fc4b): undefined reference to `hwmon_device_register'
make[1]: *** [vmlinux] Error 1
Fix it as suggested by DaveM[1] by having the Kconfig logic simply
select HWMON when TIGON3 is selected. This gets rid of all the
extra IS_ENABLED ifdeffery in tg3.c as a side benefit.
[1] http://marc.info/?l=linux-netdev&m=134250573718151&w=2
Cc: Michael Chan <mchan@broadcom.com>
Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reported-by: Anisse Astier <anisse@astier.eu>
Suggested-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent d4e6264 commit de0a414
2 files changed
+1
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | 47 | | |
49 | 48 | | |
50 | | - | |
51 | 49 | | |
52 | 50 | | |
53 | 51 | | |
| |||
9594 | 9592 | | |
9595 | 9593 | | |
9596 | 9594 | | |
9597 | | - | |
9598 | 9595 | | |
9599 | 9596 | | |
9600 | 9597 | | |
| |||
9647 | 9644 | | |
9648 | 9645 | | |
9649 | 9646 | | |
9650 | | - | |
9651 | | - | |
9652 | 9647 | | |
9653 | 9648 | | |
9654 | | - | |
9655 | 9649 | | |
9656 | 9650 | | |
9657 | 9651 | | |
9658 | 9652 | | |
9659 | 9653 | | |
9660 | | - | |
9661 | 9654 | | |
9662 | 9655 | | |
9663 | 9656 | | |
9664 | 9657 | | |
9665 | | - | |
9666 | 9658 | | |
9667 | 9659 | | |
9668 | 9660 | | |
| |||
9694 | 9686 | | |
9695 | 9687 | | |
9696 | 9688 | | |
9697 | | - | |
9698 | 9689 | | |
9699 | 9690 | | |
9700 | 9691 | | |
| |||
0 commit comments