[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <3f75784c57dc0682b5e1758daddd93fee6bb4b27.1669585920.git.christophe.jaillet@wanadoo.fr>
Date: Sun, 27 Nov 2022 22:52:10 +0100
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Rob Herring <robh+dt@...nel.org>,
Frank Rowand <frowand.list@...il.com>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>
Cc: linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
linux-gpio@...r.kernel.org, devicetree@...r.kernel.org
Subject: [PATCH] gpio: Do not include <linux/kernel.h> when not really needed.
<linux/kernel.h> is included only for using container_of().
Include <linux/container_of.h> instead, it is much lighter.
Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
---
Not sure if the prefix should be gpio or gpiolib.
Let see if build-bots spot something which is inherit via kernel.h
---
include/linux/of_gpio.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h
index a5166eb93437..6db627257a7b 100644
--- a/include/linux/of_gpio.h
+++ b/include/linux/of_gpio.h
@@ -34,7 +34,7 @@ enum of_gpio_flags {
#ifdef CONFIG_OF_GPIO
-#include <linux/kernel.h>
+#include <linux/container_of.h>
/*
* OF GPIO chip for memory mapped banks
--
2.34.1
Powered by blists - more mailing lists