Thread (3 messages) 3 messages, 3 authors, 2016-09-08

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

From: Tony Lindgren <hidden>
Date: 2016-09-08 23:21:26
Also in: linux-devicetree, linux-omap, linux-pm

* Dmitry Torokhov [off-list ref] [160908 10:04]:
On Thu, Sep 08, 2016 at 11:59:00AM +0200, Marcin Niestroj wrote:
quoted
-	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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help