From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
kernel-janitors@vger.kernel.org,
Robert Jarzmik <robert.jarzmik@free.fr>,
David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
Marek Vasut <marek.vasut@gmail.com>,
Richard Weinberger <richard@nod.at>,
linux-mtd@lists.infradead.org
Subject: Re: [PATCH 29/61] mtd: devices: simplify getting .drvdata
Date: Sun, 22 Apr 2018 19:13:34 +0200 [thread overview]
Message-ID: <20180422191334.784f7723@bbrezillon> (raw)
In-Reply-To: <20180419140641.27926-30-wsa+renesas@sang-engineering.com>
On Thu, 19 Apr 2018 16:05:59 +0200
Wolfram Sang <wsa+renesas@sang-engineering.com> wrote:
> We should get drvdata from struct device directly. Going via
> platform_device is an unneeded step back and forth.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Applied to mtd/next.
Thanks,
Boris
> ---
>
> Build tested only. buildbot is happy. Please apply individually.
>
> drivers/mtd/devices/docg3.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c
> index c594fe5eac08..802d8f159e90 100644
> --- a/drivers/mtd/devices/docg3.c
> +++ b/drivers/mtd/devices/docg3.c
> @@ -1470,8 +1470,7 @@ static struct docg3 *sysfs_dev2docg3(struct device *dev,
> struct device_attribute *attr)
> {
> int floor;
> - struct platform_device *pdev = to_platform_device(dev);
> - struct mtd_info **docg3_floors = platform_get_drvdata(pdev);
> + struct mtd_info **docg3_floors = dev_get_drvdata(dev);
>
> floor = attr->attr.name[1] - '0';
> if (floor < 0 || floor >= DOC_MAX_NBFLOORS)
next prev parent reply other threads:[~2018-04-22 17:14 UTC|newest]
Thread overview: 6+ 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 29/61] mtd: devices: " Wolfram Sang
2018-04-21 19:35 ` Robert Jarzmik
2018-04-22 17:13 ` Boris Brezillon [this message]
2018-04-19 14:06 ` [PATCH 30/61] mtd: nand: onenand: " Wolfram Sang
2018-04-22 17:29 ` Boris Brezillon
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=20180422191334.784f7723@bbrezillon \
--to=boris.brezillon@bootlin.com \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=marek.vasut@gmail.com \
--cc=richard@nod.at \
--cc=robert.jarzmik@free.fr \
--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