Re: [PATCH v5 3/3] Input: Add support for tps65217 power button

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

 




* Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx> [160908 10:04]:
> On Thu, Sep 08, 2016 at 11:59:00AM +0200, Marcin Niestroj wrote:
> > -	pwr->tps = tps;
> > +	pwr->regmap = *(struct regmap **) (tps + pwr->data->regmap_offset);
> 
> Please never ever do this stuff, it is extremely fragile and is bound to
> break. Do this instead:
> 
> 	regmap = dev_get_regmap(pdev->dev.parent, NULL);

I wonder if we should add dev_get_parent_regmap(dev, "desc")?

This passing of pdev->dev.parent always makes me wonder why
we're tweaking the parent resources..

Regards,

Tony
--
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