On Tue, Mar 21, 2017 at 03:23:50PM -0500, Jeremy Linton wrote:
> I don't understand why it was done this way, and I'm not sure that
> this driver shouldn't be triggered based on 'hi655x-regulator' device
> (which is being registered by the hi655x-pmic/mfd driver). The only
> thing I know for sure,
Hi,
On Tue, Mar 21, 2017 at 6:08 AM, Mark Brown wrote:
> On Mon, Mar 20, 2017 at 11:53:41PM -0500, Jeremy Linton wrote:
>
>> + if (!try_module_get(parent->driver->owner)) {
>> + dev_err(&pdev->dev, "unable to get parent module\n");
>> + return -ENODEV;
>> + }
>> +
On Mon, Mar 20, 2017 at 11:53:41PM -0500, Jeremy Linton wrote:
> + if (!try_module_get(parent->driver->owner)) {
> + dev_err(&pdev->dev, "unable to get parent module\n");
> + return -ENODEV;
> + }
> +
If this makes sense it should be being done in the driver core,
The hi655x-regulator driver depends on the parent pmic/mfc
device driver but doesn't increase its use count. This results
in system crashes if the parent module is unloaded while the
regulators are still in use. Add explicit module get/put
calls to keep the parent from being unloaded.
Signed-off-b
4 matches
Mail list logo