gpio: Do not include <linux/kernel.h> when not really needed.
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 27 Nov 2022 21:52:10 +0000 (22:52 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 28 Nov 2022 17:57:50 +0000 (18:57 +0100)
<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@wanadoo.fr>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
include/linux/of_gpio.h

index a5166eb..6db6272 100644 (file)
@@ -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