Message ID | 20240125081601.118051-3-krzysztof.kozlowski@linaro.org |
---|---|
State | New |
Headers | show |
Series | [1/3] gpiolib: add gpiod_to_gpio_device() stub for !GPIOLIB | expand |
On Thu, Jan 25, 2024 at 9:16 AM Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > Add empty stub of gpio_device_get_label() when GPIOLIB is not enabled. > > Cc: <stable@vger.kernel.org> > Fixes: d1f7728259ef ("gpiolib: provide gpio_device_get_label()") > Suggested-by: kernel test robot <lkp@intel.com> > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > > --- > > Cc: Philipp Zabel <p.zabel@pengutronix.de> > > Reset framework will need it: > https://lore.kernel.org/oe-kbuild-all/202401250958.YksQmnWj-lkp@intel.com/ And I suppose you'll want an immutable branch for that? Bart > --- > include/linux/gpio/driver.h | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h > index c1df7698edb0..7f75c9a51874 100644 > --- a/include/linux/gpio/driver.h > +++ b/include/linux/gpio/driver.h > @@ -831,6 +831,12 @@ static inline int gpio_device_get_base(struct gpio_device *gdev) > return -ENODEV; > } > > +static inline const char *gpio_device_get_label(struct gpio_device *gdev) > +{ > + WARN_ON(1); > + return NULL; > +} > + > static inline int gpiochip_lock_as_irq(struct gpio_chip *gc, > unsigned int offset) > { > -- > 2.34.1 >
On 25/01/2024 10:04, Bartosz Golaszewski wrote: > On Thu, Jan 25, 2024 at 9:16 AM Krzysztof Kozlowski > <krzysztof.kozlowski@linaro.org> wrote: >> >> Add empty stub of gpio_device_get_label() when GPIOLIB is not enabled. >> >> Cc: <stable@vger.kernel.org> >> Fixes: d1f7728259ef ("gpiolib: provide gpio_device_get_label()") >> Suggested-by: kernel test robot <lkp@intel.com> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> >> >> --- >> >> Cc: Philipp Zabel <p.zabel@pengutronix.de> >> >> Reset framework will need it: >> https://lore.kernel.org/oe-kbuild-all/202401250958.YksQmnWj-lkp@intel.com/ > > And I suppose you'll want an immutable branch for that? I guess that's the question to Philipp, but other way could be an Ack. Best regards, Krzysztof
On Thu, Jan 25, 2024 at 10:14 AM Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > On 25/01/2024 10:04, Bartosz Golaszewski wrote: > > On Thu, Jan 25, 2024 at 9:16 AM Krzysztof Kozlowski > > <krzysztof.kozlowski@linaro.org> wrote: > >> > >> Add empty stub of gpio_device_get_label() when GPIOLIB is not enabled. > >> > >> Cc: <stable@vger.kernel.org> > >> Fixes: d1f7728259ef ("gpiolib: provide gpio_device_get_label()") > >> Suggested-by: kernel test robot <lkp@intel.com> > >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > >> > >> --- > >> > >> Cc: Philipp Zabel <p.zabel@pengutronix.de> > >> > >> Reset framework will need it: > >> https://lore.kernel.org/oe-kbuild-all/202401250958.YksQmnWj-lkp@intel.com/ > > > > And I suppose you'll want an immutable branch for that? > > I guess that's the question to Philipp, but other way could be an Ack. > I prefer it to go through my tree in case of conflicts as I have a big refactor coming up. I'll give it a day or two on the list and set up a tag for Philipp. Bartosz > Best regards, > Krzysztof >
On Do, 2024-01-25 at 10:28 +0100, Bartosz Golaszewski wrote: > On Thu, Jan 25, 2024 at 10:14 AM Krzysztof Kozlowski > <krzysztof.kozlowski@linaro.org> wrote: > > > > On 25/01/2024 10:04, Bartosz Golaszewski wrote: > > > On Thu, Jan 25, 2024 at 9:16 AM Krzysztof Kozlowski > > > <krzysztof.kozlowski@linaro.org> wrote: > > > > > > > > Add empty stub of gpio_device_get_label() when GPIOLIB is not enabled. > > > > > > > > Cc: <stable@vger.kernel.org> > > > > Fixes: d1f7728259ef ("gpiolib: provide gpio_device_get_label()") > > > > Suggested-by: kernel test robot <lkp@intel.com> > > > > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > > > > > > > > --- > > > > > > > > Cc: Philipp Zabel <p.zabel@pengutronix.de> > > > > > > > > Reset framework will need it: > > > > https://lore.kernel.org/oe-kbuild-all/202401250958.YksQmnWj-lkp@intel.com/ > > > > > > And I suppose you'll want an immutable branch for that? > > > > I guess that's the question to Philipp, but other way could be an Ack. > > > > I prefer it to go through my tree in case of conflicts as I have a big > refactor coming up. I'll give it a day or two on the list and set up a > tag for Philipp. Works for me, thank you. regards Philipp
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index c1df7698edb0..7f75c9a51874 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -831,6 +831,12 @@ static inline int gpio_device_get_base(struct gpio_device *gdev) return -ENODEV; } +static inline const char *gpio_device_get_label(struct gpio_device *gdev) +{ + WARN_ON(1); + return NULL; +} + static inline int gpiochip_lock_as_irq(struct gpio_chip *gc, unsigned int offset) {
Add empty stub of gpio_device_get_label() when GPIOLIB is not enabled. Cc: <stable@vger.kernel.org> Fixes: d1f7728259ef ("gpiolib: provide gpio_device_get_label()") Suggested-by: kernel test robot <lkp@intel.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> --- Cc: Philipp Zabel <p.zabel@pengutronix.de> Reset framework will need it: https://lore.kernel.org/oe-kbuild-all/202401250958.YksQmnWj-lkp@intel.com/ --- include/linux/gpio/driver.h | 6 ++++++ 1 file changed, 6 insertions(+)