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

Commit e4eabf75 authored by Donglin Peng's avatar Donglin Peng Committed by Mark Brown
Browse files

ASoC: tegra: Remove unnecessary function call



First of all,the address of pdev->dev is assigned to card->dev,then
the function platform_set_drvdata copies the value the variable card
to pdev->dev.driver_data, but when calling snd_soc_register_card,the
function dev_set_drvdata(card->dev, card) will also do the same copy
operation,so i think that the former copy operation can be removed.

Signed-off-by: default avatarPeng Donglin <dolinux.peng@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 3bcfe80f
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -173,7 +173,6 @@ static int tegra_alc5632_probe(struct platform_device *pdev)
		return -ENOMEM;

	card->dev = &pdev->dev;
	platform_set_drvdata(pdev, card);
	snd_soc_card_set_drvdata(card, alc5632);

	alc5632->gpio_hp_det = of_get_named_gpio(np, "nvidia,hp-det-gpios", 0);
+0 −1
Original line number Diff line number Diff line
@@ -229,7 +229,6 @@ static int tegra_max98090_probe(struct platform_device *pdev)
		return -ENOMEM;

	card->dev = &pdev->dev;
	platform_set_drvdata(pdev, card);
	snd_soc_card_set_drvdata(card, machine);

	machine->gpio_hp_det = of_get_named_gpio(np, "nvidia,hp-det-gpios", 0);
+0 −1
Original line number Diff line number Diff line
@@ -174,7 +174,6 @@ static int tegra_rt5640_probe(struct platform_device *pdev)
		return -ENOMEM;

	card->dev = &pdev->dev;
	platform_set_drvdata(pdev, card);
	snd_soc_card_set_drvdata(card, machine);

	machine->gpio_hp_det = of_get_named_gpio_flags(
+0 −1
Original line number Diff line number Diff line
@@ -222,7 +222,6 @@ static int tegra_rt5677_probe(struct platform_device *pdev)
		return -ENOMEM;

	card->dev = &pdev->dev;
	platform_set_drvdata(pdev, card);
	snd_soc_card_set_drvdata(card, machine);

	machine->gpio_hp_det = of_get_named_gpio(np, "nvidia,hp-det-gpios", 0);
+0 −1
Original line number Diff line number Diff line
@@ -124,7 +124,6 @@ static int tegra_sgtl5000_driver_probe(struct platform_device *pdev)
		return -ENOMEM;

	card->dev = &pdev->dev;
	platform_set_drvdata(pdev, card);
	snd_soc_card_set_drvdata(card, machine);

	ret = snd_soc_of_parse_card_name(card, "nvidia,model");
Loading