From: Wolfram Sang <wsa@the-dreams.de>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
kernel-janitors@vger.kernel.org,
Vladimir Zapolskiy <vz@mleia.com>,
Sylvain Lemieux <slemieux.tyco@gmail.com>,
Rakesh Iyer <riyer@nvidia.com>,
Laxman Dewangan <ldewangan@nvidia.com>,
Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
linux-input@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-tegra@vger.kernel.org
Subject: Re: [PATCH 20/61] input: keyboard: simplify getting .drvdata
Date: Fri, 27 Apr 2018 12:20:33 +0200 [thread overview]
Message-ID: <20180427102033.msrr5sourxrtypg7@ninjato> (raw)
In-Reply-To: <20180426212327.GB210716@dtor-ws>
[-- Attachment #1: Type: text/plain, Size: 1377 bytes --]
Hi Dmitry,
> > 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?
>
> I guess it depends on how you read it. I always considered it separate
> because none (?) of the bus implementation assert this in comments to
> XXX_get_drvdata().
Well, even in the case somebody will implement a custom driver_data for
platform_devices, this person will need to convert all current users to
'dev_get_drvdata(&pdev->dev);' first in order to avoid regressions, I'd
think. This is what my patch does right now (but merely for overhead
reasons). Or?
> > > 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.
>
> No, the driver does not create a generic device, it actually creates a
> platform device, or i2c client, or spi, or something else. The fact that
True.
> suspend and resume routines have generic device as their argument has
> more to do with the language limitation rather than reflection of true
> type of the objects we are dealing with.
Ok, can be argued. I'd personally still go for the gain, but I won't
push harder than this mail.
Regards,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-04-27 10:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-19 14:05 [PATCH 00/61] tree-wide: simplify getting .drvdata Wolfram Sang
2018-04-19 14:05 ` [PATCH 17/61] hid: " Wolfram Sang
2018-04-19 14:05 ` [PATCH 20/61] input: keyboard: " Wolfram Sang
2018-04-26 19:19 ` Dmitry Torokhov
2018-04-26 20:04 ` Wolfram Sang
2018-04-26 21:23 ` Dmitry Torokhov
2018-04-27 10:20 ` Wolfram Sang [this message]
2018-04-19 14:05 ` [PATCH 21/61] input: misc: " Wolfram Sang
2018-04-19 14:05 ` [PATCH 22/61] input: mouse: " Wolfram Sang
2018-04-19 14:05 ` [PATCH 23/61] input: touchscreen: " Wolfram Sang
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=20180427102033.msrr5sourxrtypg7@ninjato \
--to=wsa@the-dreams.de \
--cc=dmitry.torokhov@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=ldewangan@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=riyer@nvidia.com \
--cc=slemieux.tyco@gmail.com \
--cc=thierry.reding@gmail.com \
--cc=vz@mleia.com \
--cc=wsa+renesas@sang-engineering.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox