Skip to content

Commit

Permalink
ASoC: tegra: Remove unnecessary function call
Browse files Browse the repository at this point in the history
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: Peng Donglin <dolinux.peng@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Donglin Peng authored and Mark Brown committed Aug 21, 2017
1 parent 3bcfe80 commit e4eabf7
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 9 deletions.
1 change: 0 additions & 1 deletion sound/soc/tegra/tegra_alc5632.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion sound/soc/tegra/tegra_max98090.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion sound/soc/tegra/tegra_rt5640.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 0 additions & 1 deletion sound/soc/tegra/tegra_rt5677.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion sound/soc/tegra/tegra_sgtl5000.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
1 change: 0 additions & 1 deletion sound/soc/tegra/tegra_wm8753.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ static int tegra_wm8753_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");
Expand Down
1 change: 0 additions & 1 deletion sound/soc/tegra/tegra_wm8903.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ static int tegra_wm8903_driver_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_spkr_en = of_get_named_gpio(np, "nvidia,spkr-en-gpios",
Expand Down
1 change: 0 additions & 1 deletion sound/soc/tegra/tegra_wm9712.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ static int tegra_wm9712_driver_probe(struct platform_device *pdev)
return -ENOMEM;

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

machine->codec = platform_device_alloc("wm9712-codec", -1);
Expand Down
1 change: 0 additions & 1 deletion sound/soc/tegra/trimslice.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ static int tegra_snd_trimslice_probe(struct platform_device *pdev)
return -ENOMEM;

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

trimslice_tlv320aic23_dai.codec_of_node = of_parse_phandle(np,
Expand Down

0 comments on commit e4eabf7

Please sign in to comment.