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 linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux