# Re: \[PATCH v5 3/7\] soc: fsl: qe: Drop legacy-of-mm-gpiochip.h header from GPIO driver

- From: Bartosz Golaszewski \<hidden\>
- Date: 2025-09-02 13:44:22 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2025/09/3197045
- Thread: https://ratatoskr.run/linuxppc-dev/2025/09/3195030/t.md

```text
On Mon, 1 Sep 2025 14:05:10 +0200, Christophe Leroy
[ref] said:
> Remove legacy-of-mm-gpiochip.h header file. The above mentioned
> file provides an OF API that's deprecated. There is no agnostic
> alternatives to it and we have to open code the logic which was
> hidden behind of_mm_gpiochip_add_data(). Note, most of the GPIO
> drivers are using their own labeling schemas and resource retrieval
> that only a few may gain of the code deduplication, so whenever
> alternative is appear we can move drivers again to use that one.
>
> As a side effect this change fixes a potential memory leak on
> an error path, if of_mm_gpiochip_add_data() fails.
>
> [Text copied from commit 34064c8267a6 ("powerpc/8xx: Drop
> legacy-of-mm-gpiochip.h header")]
>
> Suggested-by: Bartosz Golaszewski <redacted>
> Signed-off-by: Christophe Leroy <redacted>

Reviewed-by: Bartosz Golaszewski <redacted>

```
