* [PATCH] spi: imx: Use of_device_get_match_data() helper
@ 2021-03-22 3:57 Tian Tao
2021-03-25 17:37 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Tian Tao @ 2021-03-22 3:57 UTC (permalink / raw)
To: broonie, shawnguo, s.hauer; +Cc: linux-spi
Use the of_device_get_match_data() helper instead of open coding.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
drivers/spi/spi-imx.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index cf55192..4fe767a 100644
--- a/drivers/spi/spi-imx.c
+++ b/drivers/spi/spi-imx.c
@@ -1548,13 +1548,12 @@ static int spi_imx_slave_abort(struct spi_master *master)
static int spi_imx_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
- const struct of_device_id *of_id =
- of_match_device(spi_imx_dt_ids, &pdev->dev);
struct spi_master *master;
struct spi_imx_data *spi_imx;
struct resource *res;
int ret, irq, spi_drctl;
- const struct spi_imx_devtype_data *devtype_data = of_id->data;
+ const struct spi_imx_devtype_data *devtype_data =
+ of_device_get_match_data(&pdev->dev);
bool slave_mode;
u32 val;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] spi: imx: Use of_device_get_match_data() helper
2021-03-22 3:57 [PATCH] spi: imx: Use of_device_get_match_data() helper Tian Tao
@ 2021-03-25 17:37 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2021-03-25 17:37 UTC (permalink / raw)
To: Tian Tao, shawnguo, s.hauer; +Cc: Mark Brown, linux-spi
On Mon, 22 Mar 2021 11:57:56 +0800, Tian Tao wrote:
> Use the of_device_get_match_data() helper instead of open coding.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] spi: imx: Use of_device_get_match_data() helper
commit: 200d925e236f1a839bd52680f13649b23f727d51
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-25 17:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-22 3:57 [PATCH] spi: imx: Use of_device_get_match_data() helper Tian Tao
2021-03-25 17:37 ` Mark Brown
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).