Re: [PATCH] regulator: Fix recursive mutex lockdep warning
From: Stephen Boyd
Date: Tue Jul 03 2012 - 16:08:46 EST
On 07/03/12 12:26, Mark Brown wrote:
> On Mon, Jul 02, 2012 at 07:21:06PM -0700, Stephen Boyd wrote:
>> A recursive lockdep warning occurs if you call
>> regulator_set_optimum_mode() on a regulator with a supply because
>> there is no nesting annotation for the rdev->mutex. To avoid this
>> warning, get the supply's load before locking the regulator's
>> mutex to avoid grabbing the same class of lock twice.
> Applied, thanks. Though we should probably just remove the optimal mode
> stuff on account of the total absence of any users...
Please don't remove it. We use the optimal stuff fairly often
internally, plus our usb driver is upstream and using the API.
What do you think about removing the locking in get_voltage? Is that better?
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
--
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/