mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Flaviu Nistor <flaviu.nistor@gmail.com>
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hwmon: (lm75) Add explicit header include
Date: Sat, 16 May 2026 05:27:10 -0700	[thread overview]
Message-ID: <690b856a-e02e-4780-803f-7bfd2c9cf596@roeck-us.net> (raw)
In-Reply-To: <20260516075708.6682-1-flaviu.nistor@gmail.com>

On Sat, May 16, 2026 at 10:57:08AM +0300, Flaviu Nistor wrote:
> Since device_property_read_string() is used in the
> probe function add explicit include for
> linux/mod_devicetable.h and linux/property.h rather
> than having implicit inclusions.
> Header linux/of.h can be removed and also of_match_ptr()
> improving non-Device Tree compatibility of the driver.
> 

Line breaks should be at column 75. There are way too many line breaks
above.

> ---
>  drivers/hwmon/lm75.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
> index 845a0e09ea9f..32279049d44c 100644
> --- a/drivers/hwmon/lm75.c
> +++ b/drivers/hwmon/lm75.c
> @@ -14,7 +14,8 @@
>  #include <linux/i3c/device.h>
>  #include <linux/hwmon.h>
>  #include <linux/err.h>
> -#include <linux/of.h>
> +#include <linux/mod_devicetable.h>
> +#include <linux/property.h>
>  #include <linux/regmap.h>
>  #include <linux/util_macros.h>
>  #include <linux/regulator/consumer.h>
> @@ -1152,7 +1153,7 @@ static struct i2c_driver lm75_i2c_driver = {
>  	.class		= I2C_CLASS_HWMON,
>  	.driver = {
>  		.name	= "lm75",
> -		.of_match_table = of_match_ptr(lm75_of_match),
> +		.of_match_table = lm75_of_match,

With this, the __maybe_unused in the declaration of lm75_of_match
is no longer necessary. Please drop.

Thanks,
Guenter

      reply	other threads:[~2026-05-16 12:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-16  7:57 Flaviu Nistor
2026-05-16 12:27 ` Guenter Roeck [this message]

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=690b856a-e02e-4780-803f-7bfd2c9cf596@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=flaviu.nistor@gmail.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®