mbox series

[0/2] hwmon: Add include stubs

Message ID 20220825214341.2743-1-W_Armin@gmx.de (mailing list archive)
Headers show
Series hwmon: Add include stubs | expand

Message

Armin Wolf Aug. 25, 2022, 9:43 p.m. UTC
Currently, hwmon.h and hwmon-vid.h provide no stub definitions
in case hwmon/hwmon-vid support was disabled. This forces drivers
using those functions to either select CONFIG_HWMON or to use
lots of #ifdef to avoid compilation errors in such a case.
One example is the ath10k driver, but radeon and amdgpu
would also profit from being able to no longer having to select
CONFIG_HWMON.

The first patch adds include stubs to hwmon.h and hwmon-vid.h
so that drivers can omit such workarounds.

The second patch fixes a minor issue in hwmon.h.

Both patches where tested with CONFIG_HWMON set to y, m and n,
and the resulting kernel was able to boot successfully.

Armin Wolf (2):
  hwmon: Add include stubs
  hwmon: Use struct definitions from header files

 include/linux/hwmon-vid.h | 18 +++++++++
 include/linux/hwmon.h     | 81 +++++++++++++++++++++++++++++++++++++--
 2 files changed, 95 insertions(+), 4 deletions(-)

--
2.30.2