On Thu, Nov 20, 2014 at 10:31:39PM +0900, Jaewon Kim wrote:
+ haptic->regulator = devm_regulator_get(&pdev->dev, "haptic");This needs to be _get_exclusive() - the driver will be broken if
+ if (IS_ERR(haptic->regulator)) {
+ dev_err(&pdev->dev, "failed to get regulator\n");
+ return PTR_ERR(haptic->regulator);
+ }
something else shares the regualtor since it relies on both enabling and
disabling the regulator and on setting the voltage for effects. It's
not like a power supply where leaving the device powered when it could
be off is going to have no effect, if the power is left on then the
haptic motor will continue to operate.