Re: [PATCH 4/6] regulator: gpio-regulator: use devm_regulator_register()

From: Heiko Stübner
Date: Fri Dec 06 2013 - 04:55:45 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/