netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] can: mcp251x: Get rid of duplicate of_node assignment
@ 2021-12-02 20:58 Andy Shevchenko
  2021-12-09 11:58 ` Andy Shevchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2021-12-02 20:58 UTC (permalink / raw)
  To: Marc Kleine-Budde, linux-can, netdev, linux-kernel
  Cc: Wolfgang Grandegger, David S. Miller, Jakub Kicinski,
	Andy Shevchenko

GPIO library does copy the of_node from the parent device of
the GPIO chip, there is no need to repeat this in the individual
drivers. Remove assignment here.

For the details one may look into the of_gpio_dev_init() implementation.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/net/can/spi/mcp251x.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/can/spi/mcp251x.c b/drivers/net/can/spi/mcp251x.c
index 0579ab74f728..0cec808e8727 100644
--- a/drivers/net/can/spi/mcp251x.c
+++ b/drivers/net/can/spi/mcp251x.c
@@ -600,9 +600,6 @@ static int mcp251x_gpio_setup(struct mcp251x_priv *priv)
 	gpio->ngpio = ARRAY_SIZE(mcp251x_gpio_names);
 	gpio->names = mcp251x_gpio_names;
 	gpio->can_sleep = true;
-#ifdef CONFIG_OF_GPIO
-	gpio->of_node = priv->spi->dev.of_node;
-#endif
 
 	return devm_gpiochip_add_data(&priv->spi->dev, gpio, priv);
 }
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-01-05 14:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-02 20:58 [PATCH v1 1/1] can: mcp251x: Get rid of duplicate of_node assignment Andy Shevchenko
2021-12-09 11:58 ` Andy Shevchenko
2021-12-10 13:06   ` Marc Kleine-Budde
2021-12-10 13:19     ` Andy Shevchenko
2022-01-05 14:21       ` Andy Shevchenko
2022-01-05 14:34         ` Marc Kleine-Budde
2022-01-05 14:47           ` Andy Shevchenko
2022-01-05 14:54             ` Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).