Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: Armin Wolf <W_Armin@gmx.de>
To: jdelvare@suse.com, linux@roeck-us.net
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] hwmon: Add include stubs
Date: Thu, 25 Aug 2022 23:43:39 +0200	[thread overview]
Message-ID: <20220825214341.2743-1-W_Armin@gmx.de> (raw)

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


             reply	other threads:[~2022-08-25 21:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-25 21:43 Armin Wolf [this message]
2022-08-25 21:43 ` [PATCH 1/2] hwmon: Add include stubs Armin Wolf
2022-08-26 12:47   ` Guenter Roeck
2022-08-26 18:07     ` Armin Wolf
2022-08-25 21:43 ` [PATCH 2/2] hwmon: Use struct definitions from header files Armin Wolf
2022-08-26 12:23   ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220825214341.2743-1-W_Armin@gmx.de \
    --to=w_armin@gmx.de \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox