Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

reset: gpio: remove unneeded OF-node put

priv->rc.of_node is never set in reset core. Even if it were: tasking
the reset-gpio driver with controlling the reference count of an OF node
set up in reset core is a weird inversion of responsability. But it's
also wrong in that the underlying device never actually gets removed so
the node should not be put at all and especially not at driver detach.
Remove the devres action.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>

authored by

Bartosz Golaszewski and committed by
Philipp Zabel
fe3da77f 9d93e13b

-10
-10
drivers/reset/reset-gpio.c
··· 52 52 return reset_spec->args[0]; 53 53 } 54 54 55 - static void reset_gpio_of_node_put(void *data) 56 - { 57 - of_node_put(data); 58 - } 59 - 60 55 static int reset_gpio_probe(struct auxiliary_device *adev, 61 56 const struct auxiliary_device_id *id) 62 57 { 63 58 struct device *dev = &adev->dev; 64 59 struct of_phandle_args *platdata = dev_get_platdata(dev); 65 60 struct reset_gpio_priv *priv; 66 - int ret; 67 61 68 62 if (!platdata) 69 63 return -EINVAL; ··· 77 83 priv->rc.owner = THIS_MODULE; 78 84 priv->rc.dev = dev; 79 85 priv->rc.of_args = platdata; 80 - ret = devm_add_action_or_reset(dev, reset_gpio_of_node_put, 81 - priv->rc.of_node); 82 - if (ret) 83 - return ret; 84 86 85 87 /* Cells to match GPIO specifier, but it's not really used */ 86 88 priv->rc.of_reset_n_cells = 2;