Messages in this thread | | | From | Heiko Stübner <> | Subject | Re: [PATCH 4/6] regulator: gpio-regulator: use devm_regulator_register() | Date | Fri, 6 Dec 2013 10:12:05 +0100 |
| |
Hi,
Am Freitag, 6. Dezember 2013, 08:10:42 schrieb Jingoo Han:
> @@ -351,8 +352,6 @@ static int gpio_regulator_remove(struct platform_device > *pdev) { > struct gpio_regulator_data *drvdata = platform_get_drvdata(pdev); > > - regulator_unregister(drvdata->dev); > - > gpio_free_array(drvdata->gpios, drvdata->nr_gpios); > > kfree(drvdata->states);
I'm not this firm in the core driver/device behaviour, but when looking at __device_release_driver I see that the remove callback runs before devres_release_all, which would effectively free the gpios before the regulator gets unregistered - is this racy with a regulator change at the same time?
Heiko
| |