Re: Query: Regulator framework in EHCI driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 13, 2009 at 09:52:14AM +0530, Gupta, Ajay Kumar wrote:

> +		snprintf(supply, 7, "hsusb%d", i);

It'd be better to use sizeof() rather than a hard coded 7 here.

> +             omap->regulator[i] = regulator_get(omap->dev, supply);

Looking at your code this needs to be regulator_get_exclusive() - you
conditinoally disable the regulator when unregistering depending on if
it reports as enabled but if the supply is shared then it can be enabled
without this driver having done so.

Alternatively, make the regulator_disable() in the shutdown path
unconditional.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux