Commit dd56b638951936cda945ba5641cc44927a5f1c6d

Authored by Geert Uytterhoeven
Committed by Jean Delvare
1 parent 57f8f7b60d

hwmon: (w83781d) Fix linking when built-in

When w83781d is built-in, the final links fails with the following vague error
message:

`.exit.text' referenced in section `.init.text' of drivers/built-in.o: defined
in discarded section `.exit.text' of drivers/built-in.o

w83781d_isa_unregister() cannot be marked __exit, as it's also called from
sensors_w83781d_init(), which is marked __init.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

drivers/hwmon/w83781d.c
... ... @@ -1968,7 +1968,7 @@
1968 1968 return res;
1969 1969 }
1970 1970  
1971   -static void __exit
  1971 +static void
1972 1972 w83781d_isa_unregister(void)
1973 1973 {
1974 1974 if (pdev) {
... ... @@ -2017,7 +2017,7 @@
2017 2017 return 0;
2018 2018 }
2019 2019  
2020   -static void __exit
  2020 +static void
2021 2021 w83781d_isa_unregister(void)
2022 2022 {
2023 2023 }