All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
To: Dmitry Torokhov
	<dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Marcin Niestroj
	<m.niestroj-z3quKL4iOrmQ6ZAhV5LmOA@public.gmane.org>,
	Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Sebastian Reichel <sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Grygorii Strashko
	<grygorii.strashko-l0cyMroinI0@public.gmane.org>,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v5 3/3] Input: Add support for tps65217 power button
Date: Thu, 8 Sep 2016 16:21:26 -0700	[thread overview]
Message-ID: <20160908232126.piopvzfhpfhpw2ed@atomide.com> (raw)
In-Reply-To: <20160908170437.GA30299@dtor-ws>

* Dmitry Torokhov <dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> [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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2016-09-08 23:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-08  9:58 [PATCH v5 0/3] mfd: tps65217: Add power-button and IRQ support Marcin Niestroj
2016-09-08  9:58 ` [PATCH v5 1/3] mfd: tps65217: Add support for IRQs Marcin Niestroj
2016-09-08 23:17   ` Tony Lindgren
2016-09-08  9:58 ` [PATCH v5 2/3] mfd: tps65217: Add power button as subdevice Marcin Niestroj
2016-09-08 23:18   ` Tony Lindgren
     [not found] ` <20160908095900.30975-1-m.niestroj-z3quKL4iOrmQ6ZAhV5LmOA@public.gmane.org>
2016-09-08  9:59   ` [PATCH v5 3/3] Input: Add support for tps65217 power button Marcin Niestroj
2016-09-08 17:04     ` Dmitry Torokhov
2016-09-08 23:21       ` Tony Lindgren [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160908232126.piopvzfhpfhpw2ed@atomide.com \
    --to=tony-4v6ys6ai5vpbdgjk7y7tuq@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=grygorii.strashko-l0cyMroinI0@public.gmane.org \
    --cc=lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=m.niestroj-z3quKL4iOrmQ6ZAhV5LmOA@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.