Re: [RESUBMIT PATCH v4 7/8] regulator: sky81452: Add compatible string for device binding

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

 




On Mon, Oct 13, 2014 at 12:35:12PM +0200, Mark Brown wrote:
> On Mon, Oct 13, 2014 at 02:47:41PM +0900, Gyungoh Yoo wrote:
> 
> > -	np = of_get_child_by_name(dev->parent->of_node, "regulator");
> > -	if (unlikely(!np)) {
> > +	if (!np) {
> >  		dev_err(dev, "regulator node not found");
> > -		return NULL;
> > +		return ERR_PTR(-ENODATA);
> >  	}
> 
> If you're doing anything here you should convert the code to use the
> simplified interface for parsing regulator data based on putting the
> subnode name and regualtor name in the regulator descriptor.

Thank you for the review.

The driver has of_device_id.

static const struct of_device_id sky81452_reg_of_match[] = {
        { .compatible = "skyworks,sky81452-regulator", },
        { }
};

And the MFD adds the driver with of_compatible="skyworks,sky81452-regulator".
MFD core maps the device node and the regulator driver does
not need to parse the subnode name.

Thanks.
--
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