projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ffe0c49
)
spi: tegra20: Use of_device_get_match_data()
author
Minghao Chi
<chi.minghao@zte.com.cn>
Tue, 15 Mar 2022 02:31:38 +0000
(
02:31
+0000)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:23:57 +0000
(14:23 +0200)
[ Upstream commit
c9839acfcbe20ce43d363c2a9d0772472d9921c0
]
Use of_device_get_match_data() to simplify the code.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Link:
https://lore.kernel.org/r/20220315023138.2118293-1-chi.minghao@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-tegra20-slink.c
patch
|
blob
|
history
diff --git
a/drivers/spi/spi-tegra20-slink.c
b/drivers/spi/spi-tegra20-slink.c
index 3226c4e1c7c0dd29e6a7f3e36db18f4cd401b9a8..3b44ca455049d1ed8b02f654dc987ace7e3dad34 100644
(file)
--- a/
drivers/spi/spi-tegra20-slink.c
+++ b/
drivers/spi/spi-tegra20-slink.c
@@
-1003,14
+1003,8
@@
static int tegra_slink_probe(struct platform_device *pdev)
struct resource *r;
int ret, spi_irq;
const struct tegra_slink_chip_data *cdata = NULL;
- const struct of_device_id *match;
- match = of_match_device(tegra_slink_of_match, &pdev->dev);
- if (!match) {
- dev_err(&pdev->dev, "Error: No device match found\n");
- return -ENODEV;
- }
- cdata = match->data;
+ cdata = of_device_get_match_data(&pdev->dev);
master = spi_alloc_master(&pdev->dev, sizeof(*tspi));
if (!master) {