[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180426200401.lvqiy4gnchkwr4qw@ninjato>
Date: Thu, 26 Apr 2018 22:04:01 +0200
From: Wolfram Sang <wsa@...-dreams.de>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Wolfram Sang <wsa+renesas@...g-engineering.com>,
linux-kernel@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
kernel-janitors@...r.kernel.org, Vladimir Zapolskiy <vz@...ia.com>,
Sylvain Lemieux <slemieux.tyco@...il.com>,
Rakesh Iyer <riyer@...dia.com>,
Laxman Dewangan <ldewangan@...dia.com>,
Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
linux-input@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-tegra@...r.kernel.org
Subject: Re: [PATCH 20/61] input: keyboard: simplify getting .drvdata
Hi Dmitry,
> > We should get drvdata from struct device directly. Going via
> > platform_device is an unneeded step back and forth.
>
> I consider the fact that platform device's driver data is accessible via
> device driver data being implementation detail that may or may not change
Isn't it actually the other way around? platform_get_drvdata() is a
convenience function to access driver_data which is embedded in struct
device?
> in the future, so I'd prefer keep using the proper accessors for the
> objects we are dealing with.
Exactly. I'd just argue, the object we are dealing with, declared in the
PM functions, is a struct device.
Thanks for the comment,
Wolfram
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists