diff mbox series

[v2,1/1] gpio: zevio: Add missed label initialisation

Message ID 20241118092729.516736-1-andriy.shevchenko@linux.intel.com
State New
Headers show
Series [v2,1/1] gpio: zevio: Add missed label initialisation | expand

Commit Message

Andy Shevchenko Nov. 18, 2024, 9:27 a.m. UTC
Initialise the GPIO chip label correctly as it was done by
of_mm_gpiochip_add_data() before the below mentioned change.

Fixes: cf8f4462e5fa ("gpio: zevio: drop of_gpio.h header")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v2: explained why label should be initialised (Bart)
 drivers/gpio/gpio-zevio.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Bartosz Golaszewski Nov. 21, 2024, 8:10 a.m. UTC | #1
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>


On Mon, 18 Nov 2024 11:27:07 +0200, Andy Shevchenko wrote:
> Initialise the GPIO chip label correctly as it was done by
> of_mm_gpiochip_add_data() before the below mentioned change.
> 
> 

Applied, thanks!

[1/1] gpio: zevio: Add missed label initialisation
      commit: 5bbed54ba66925ebca19092d0750630f943d7bf2

Best regards,
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-zevio.c b/drivers/gpio/gpio-zevio.c
index 2de61337ad3b..d7230fd83f5d 100644
--- a/drivers/gpio/gpio-zevio.c
+++ b/drivers/gpio/gpio-zevio.c
@@ -11,6 +11,7 @@ 
 #include <linux/io.h>
 #include <linux/mod_devicetable.h>
 #include <linux/platform_device.h>
+#include <linux/property.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
 
@@ -169,6 +170,7 @@  static const struct gpio_chip zevio_gpio_chip = {
 /* Initialization */
 static int zevio_gpio_probe(struct platform_device *pdev)
 {
+	struct device *dev = &pdev->dev;
 	struct zevio_gpio *controller;
 	int status, i;
 
@@ -180,6 +182,10 @@  static int zevio_gpio_probe(struct platform_device *pdev)
 	controller->chip = zevio_gpio_chip;
 	controller->chip.parent = &pdev->dev;
 
+	controller->chip.label = devm_kasprintf(dev, GFP_KERNEL, "%pfw", dev_fwnode(dev));
+	if (!controller->chip.label)
+		return -ENOMEM;
+
 	controller->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(controller->regs))
 		return dev_err_probe(&pdev->dev, PTR_ERR(controller->regs),