From: Linus Walleij <linus.walleij@linaro.org>
To: Jens Axboe <axboe@kernel.dk>, linux-ide@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
Imre Kaloz <kaloz@openwrt.org>,
Krzysztof Halasa <khalasa@piap.pl>,
Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH 1/5] pata: ixp4xx: Use local dev variable
Date: Wed, 28 Jul 2021 11:02:38 +0200 [thread overview]
Message-ID: <20210728090242.2758812-2-linus.walleij@linaro.org> (raw)
In-Reply-To: <20210728090242.2758812-1-linus.walleij@linaro.org>
Let's simplify all &pdev->dev references by creating a
local struct device *dev variable.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/ata/pata_ixp4xx_cf.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c
index 5881d64af943..23f0f7cacd52 100644
--- a/drivers/ata/pata_ixp4xx_cf.c
+++ b/drivers/ata/pata_ixp4xx_cf.c
@@ -139,6 +139,7 @@ static int ixp4xx_pata_probe(struct platform_device *pdev)
struct resource *cs0, *cs1;
struct ata_host *host;
struct ata_port *ap;
+ struct device *dev = &pdev->dev;
struct ixp4xx_pata_data *data = dev_get_platdata(&pdev->dev);
int ret;
int irq;
@@ -150,17 +151,17 @@ static int ixp4xx_pata_probe(struct platform_device *pdev)
return -EINVAL;
/* allocate host */
- host = ata_host_alloc(&pdev->dev, 1);
+ host = ata_host_alloc(dev, 1);
if (!host)
return -ENOMEM;
/* acquire resources and fill host */
- ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
+ ret = dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
if (ret)
return ret;
- data->cs0 = devm_ioremap(&pdev->dev, cs0->start, 0x1000);
- data->cs1 = devm_ioremap(&pdev->dev, cs1->start, 0x1000);
+ data->cs0 = devm_ioremap(dev, cs0->start, 0x1000);
+ data->cs1 = devm_ioremap(dev, cs1->start, 0x1000);
if (!data->cs0 || !data->cs1)
return -ENOMEM;
@@ -185,7 +186,7 @@ static int ixp4xx_pata_probe(struct platform_device *pdev)
ixp4xx_setup_port(ap, data, cs0->start, cs1->start);
- ata_print_version_once(&pdev->dev, DRV_VERSION);
+ ata_print_version_once(dev, DRV_VERSION);
/* activate host */
return ata_host_activate(host, irq, ata_sff_interrupt, 0, &ixp4xx_sht);
--
2.31.1
next prev parent reply other threads:[~2021-07-28 9:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-28 9:02 [PATCH 0/5] Update and rewrite IXP4xx PATA driver Linus Walleij
2021-07-28 9:02 ` Linus Walleij [this message]
2021-07-28 9:02 ` [PATCH 2/5] pata: ixp4xx: Use IS_ENABLED() to determine endianness Linus Walleij
2021-07-28 9:02 ` [PATCH 3/5] pata: ixp4xx: Refer to cmd and ctl rather than csN Linus Walleij
2021-07-28 9:02 ` [PATCH 4/5] pata: ixp4xx: Add DT bindings Linus Walleij
2021-07-28 16:14 ` Rob Herring
2021-07-28 9:02 ` [PATCH 5/5] pata: ixp4xx: Rewrite to use device tree Linus Walleij
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=20210728090242.2758812-2-linus.walleij@linaro.org \
--to=linus.walleij@linaro.org \
--cc=axboe@kernel.dk \
--cc=kaloz@openwrt.org \
--cc=khalasa@piap.pl \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-ide@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).