[PATCH 01/35] mfd: ab8500-gpadc: Implemented suspend/resume

Mark Brown broonie at opensource.wolfsonmicro.com
Wed Feb 20 08:19:12 EST 2013


On Fri, Feb 15, 2013 at 12:56:32PM +0000, Lee Jones wrote:

> +static int ab8500_gpadc_suspend(struct device *dev)
> +{
> +	struct ab8500_gpadc *gpadc = dev_get_drvdata(dev);
> +
> +	mutex_lock(&gpadc->ab8500_gpadc_lock);
> +
> +	pm_runtime_get_sync(dev);
> +
> +	regulator_disable(gpadc->regu);
> +	return 0;
> +}

This doesn't look especially sane...  You're doing a runtime get, taking
the lock without releasing it and disabling the regulator.  This is
*very* odd, both the changelog and the code need to explain what's going
on and why it's safe in a lot more detail here.



More information about the linux-arm-kernel mailing list