From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Daniel Mack <daniel@zonque.org>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Robert Jarzmik <robert.jarzmik@free.fr>,
Mark Brown <broonie@kernel.org>
Subject: [PATCH v4 4/5] spi: pxa2xx: Consistently use dev variable in pxa2xx_spi_init_pdata()
Date: Thu, 20 Oct 2022 22:44:59 +0300 [thread overview]
Message-ID: <20221020194500.10225-5-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20221020194500.10225-1-andriy.shevchenko@linux.intel.com>
We have a temporary variable to keep a pointer to a struct device in
the pxa2xx_spi_init_pdata(). Use it consistently there.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/spi/spi-pxa2xx.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 0824965e894d..00c07e93d414 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1349,7 +1349,7 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
return ERR_PTR(status);
}
- match = device_get_match_data(&pdev->dev);
+ match = device_get_match_data(dev);
if (match)
type = (enum pxa_ssp_type)match;
else if (value > SSP_UNDEFINED && value < SSP_MAX)
@@ -1357,7 +1357,7 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
else
return ERR_PTR(-EINVAL);
- pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
+ pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
if (!pdata)
return ERR_PTR(-ENOMEM);
@@ -1376,7 +1376,7 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
pdata->dma_filter = pxa2xx_spi_idma_filter;
}
- ssp->clk = devm_clk_get(&pdev->dev, NULL);
+ ssp->clk = devm_clk_get(dev, NULL);
if (IS_ERR(ssp->clk))
return ERR_CAST(ssp->clk);
@@ -1385,7 +1385,7 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
return ERR_PTR(ssp->irq);
ssp->type = type;
- ssp->dev = &pdev->dev;
+ ssp->dev = dev;
status = acpi_dev_uid_to_integer(ACPI_COMPANION(dev), &uid);
if (status)
@@ -1393,7 +1393,7 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
else
ssp->port_id = uid;
- pdata->is_slave = device_property_read_bool(&pdev->dev, "spi-slave");
+ pdata->is_slave = device_property_read_bool(dev, "spi-slave");
pdata->num_chipselect = 1;
pdata->enable_dma = true;
pdata->dma_burst_size = 1;
--
2.35.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-10-20 19:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-20 19:44 [PATCH v4 0/5] spi: pxa2xx: Pass the SSP type via device property Andy Shevchenko
2022-10-20 19:44 ` [PATCH v4 1/5] spi: pxa2xx: Respect Intel SSP type given by a property Andy Shevchenko
2022-10-21 12:16 ` Mark Brown
2022-10-21 12:26 ` Andy Shevchenko
2022-10-20 19:44 ` [PATCH v4 2/5] spi: pxa2xx: Remove no more needed PCI ID table Andy Shevchenko
2022-10-20 19:44 ` [PATCH v4 3/5] spi: pxa2xx: Move OF and ACPI ID tables closer to their user Andy Shevchenko
2022-10-20 19:44 ` Andy Shevchenko [this message]
2022-10-20 19:45 ` [PATCH v4 5/5] spi: pxa2xx: Switch from PM ifdeffery to pm_ptr() Andy Shevchenko
2022-10-21 15:31 ` (subset) [PATCH v4 0/5] spi: pxa2xx: Pass the SSP type via device property Mark Brown
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=20221020194500.10225-5-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=broonie@kernel.org \
--cc=daniel@zonque.org \
--cc=haojian.zhuang@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=robert.jarzmik@free.fr \
/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).