linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hwmon: (lm75) Replace kernel.h with the necessary inclusions
@ 2022-06-03 20:51 Christophe JAILLET
  2022-06-05 17:41 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2022-06-03 20:51 UTC (permalink / raw)
  To: Jean Delvare, Guenter Roeck
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-hwmon

When kernel.h is used in the headers it adds a lot into dependency hell,
especially when there are circular dependencies are involved.

Replace kernel.h inclusion with the list of what is really being used.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/hwmon/lm75.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/hwmon/lm75.h b/drivers/hwmon/lm75.h
index a398171162a8..b803ada5e3c9 100644
--- a/drivers/hwmon/lm75.h
+++ b/drivers/hwmon/lm75.h
@@ -11,7 +11,8 @@
  * which contains this code, we don't worry about the wasted space.
  */
 
-#include <linux/kernel.h>
+#include <linux/minmax.h>
+#include <linux/types.h>
 
 /* straight from the datasheet */
 #define LM75_TEMP_MIN (-55000)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] hwmon: (lm75) Replace kernel.h with the necessary inclusions
  2022-06-03 20:51 [PATCH] hwmon: (lm75) Replace kernel.h with the necessary inclusions Christophe JAILLET
@ 2022-06-05 17:41 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2022-06-05 17:41 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Jean Delvare, linux-kernel, kernel-janitors, linux-hwmon

On Fri, Jun 03, 2022 at 10:51:46PM +0200, Christophe JAILLET wrote:
> When kernel.h is used in the headers it adds a lot into dependency hell,
> especially when there are circular dependencies are involved.
> 
> Replace kernel.h inclusion with the list of what is really being used.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Applied to hwmon-next.

Thanks,
Guenter

> ---
>  drivers/hwmon/lm75.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/lm75.h b/drivers/hwmon/lm75.h
> index a398171162a8..b803ada5e3c9 100644
> --- a/drivers/hwmon/lm75.h
> +++ b/drivers/hwmon/lm75.h
> @@ -11,7 +11,8 @@
>   * which contains this code, we don't worry about the wasted space.
>   */
>  
> -#include <linux/kernel.h>
> +#include <linux/minmax.h>
> +#include <linux/types.h>
>  
>  /* straight from the datasheet */
>  #define LM75_TEMP_MIN (-55000)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-05 17:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-03 20:51 [PATCH] hwmon: (lm75) Replace kernel.h with the necessary inclusions Christophe JAILLET
2022-06-05 17:41 ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).