Re: [PATCH 5/6] [v6] x86/olpc: select GPIOLIB_LEGACY

[email protected]
Newsgroups org.kernel.vger.linux-leds,org.kernel.vger.linux-input
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Replacing `#include <linux/gpio.h>` with `#include <linux/gpio/legacy.h>` causes a fatal compile error because the new header file does not exist in the kernel tree.
--

--- Patch [5]: [PATCH 5/6] [v6] x86/olpc: select GPIOLIB_LEGACY ---
commit dfd246b7263a8d5eeb27b20b07f4d9310db7a8d6
Author: Arnd Bergmann <[email protected]>

x86/olpc: select GPIOLIB_LEGACY

This commit selects CONFIG_GPIOLIB_LEGACY for the OLPC platform to resolve
implicit function declaration errors for legacy GPIO functions. It also
updates the audio driver Kconfig to depend on GPIOLIB_LEGACY or !OLPC.

> diff --git a/arch/x86/platform/olpc/olpc-xo1-sci.c b/arch/x86/platform/olpc/olpc-xo1-sci.c
> index 30751b42d54ef..a5b47960ba32e 100644
> --- a/arch/x86/platform/olpc/olpc-xo1-sci.c
> +++ b/arch/x86/platform/olpc/olpc-xo1-sci.c
> @@ -9,7 +9,7 @@
>  
>  #include <linux/cs5535.h>
>  #include <linux/device.h>
> -#include <linux/gpio.h>
> +#include <linux/gpio/legacy.h>

[Severity: Low]
Does this header actually exist in the kernel tree? Compiling this file
with CONFIG_OLPC enabled appears to result in a fatal No such file or
directory error because include/linux/gpio/legacy.h is missing.

>  #include <linux/input.h>
>  #include <linux/interrupt.h>

[ ... ]

> diff --git a/sound/pci/cs5535audio/cs5535audio_olpc.c b/sound/pci/cs5535audio/cs5535audio_olpc.c
> index 122170a410d9e..cfdcc5bf4341e 100644
> --- a/sound/pci/cs5535audio/cs5535audio_olpc.c
> +++ b/sound/pci/cs5535audio/cs5535audio_olpc.c
> @@ -9,7 +9,7 @@
>  #include <sound/info.h>
>  #include <sound/control.h>
>  #include <sound/ac97_codec.h>
> -#include <linux/gpio.h>
> +#include <linux/gpio/legacy.h>

[Severity: Low]
Similarly, will this cause a build failure here for the same missing header
reason?

>  
>  #include <asm/olpc.h>

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=5
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.