Re: [PATCH 8/9] regulator: bd71837: BD71837 PMIC regulator driver

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

 



On Thu, May 24, 2018 at 05:51:27PM +0000, Vaittinen, Matti wrote:
> 
> From: Mark Brown [broonie@xxxxxxxxxx]
> > Sent: Thursday, May 24, 2018 5:14 PM
> > On Thu, May 24, 2018 at 09:00:36AM +0300, Matti Vaittinen wrote:
> > > +             rdev = regulator_register(desc, &config);
> > > +             if (IS_ERR(rdev)) {
> >
> > devm_regulator_regster()
> 
> Makes sense. Thanks

I was going to do 

-       pmic = kzalloc(sizeof(struct bd71837_pmic), GFP_KERNEL);
+       pmic = devm_kzalloc(&pdev->dev, sizeof(struct bd71837_pmic),
+                           GFP_KERNEL);

and

-               rdev = regulator_register(desc, &config);
+               rdev = devm_regulator_register(&pdev->dev, desc, &config);

but is there now a race regarding freeing the pmic structure and
unregistering the regulator?

Best Regards
    Matti Vaittinen
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux