Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07150842 authored by Minghao Chi's avatar Minghao Chi Committed by Greg Kroah-Hartman
Browse files

spi: tegra20: Use of_device_get_match_data()



[ Upstream commit c9839acfcbe20ce43d363c2a9d0772472d9921c0 ]

Use of_device_get_match_data() to simplify the code.

Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarMinghao Chi <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220315023138.2118293-1-chi.minghao@zte.com.cn


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 0cccf9d4
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -1011,14 +1011,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) {