Skip to content

Commit e4eabf7

Browse files
Donglin Pengbroonie
authored andcommitted
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: Peng Donglin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 3bcfe80 commit e4eabf7

File tree

9 files changed

+0
-9
lines changed

9 files changed

+0
-9
lines changed

sound/soc/tegra/tegra_alc5632.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ static int tegra_alc5632_probe(struct platform_device *pdev)
173173
return -ENOMEM;
174174

175175
card->dev = &pdev->dev;
176-
platform_set_drvdata(pdev, card);
177176
snd_soc_card_set_drvdata(card, alc5632);
178177

179178
alc5632->gpio_hp_det = of_get_named_gpio(np, "nvidia,hp-det-gpios", 0);

sound/soc/tegra/tegra_max98090.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ static int tegra_max98090_probe(struct platform_device *pdev)
229229
return -ENOMEM;
230230

231231
card->dev = &pdev->dev;
232-
platform_set_drvdata(pdev, card);
233232
snd_soc_card_set_drvdata(card, machine);
234233

235234
machine->gpio_hp_det = of_get_named_gpio(np, "nvidia,hp-det-gpios", 0);

sound/soc/tegra/tegra_rt5640.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ static int tegra_rt5640_probe(struct platform_device *pdev)
174174
return -ENOMEM;
175175

176176
card->dev = &pdev->dev;
177-
platform_set_drvdata(pdev, card);
178177
snd_soc_card_set_drvdata(card, machine);
179178

180179
machine->gpio_hp_det = of_get_named_gpio_flags(

sound/soc/tegra/tegra_rt5677.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@ static int tegra_rt5677_probe(struct platform_device *pdev)
222222
return -ENOMEM;
223223

224224
card->dev = &pdev->dev;
225-
platform_set_drvdata(pdev, card);
226225
snd_soc_card_set_drvdata(card, machine);
227226

228227
machine->gpio_hp_det = of_get_named_gpio(np, "nvidia,hp-det-gpios", 0);

sound/soc/tegra/tegra_sgtl5000.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ static int tegra_sgtl5000_driver_probe(struct platform_device *pdev)
124124
return -ENOMEM;
125125

126126
card->dev = &pdev->dev;
127-
platform_set_drvdata(pdev, card);
128127
snd_soc_card_set_drvdata(card, machine);
129128

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

sound/soc/tegra/tegra_wm8753.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ static int tegra_wm8753_driver_probe(struct platform_device *pdev)
132132
return -ENOMEM;
133133

134134
card->dev = &pdev->dev;
135-
platform_set_drvdata(pdev, card);
136135
snd_soc_card_set_drvdata(card, machine);
137136

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

sound/soc/tegra/tegra_wm8903.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ static int tegra_wm8903_driver_probe(struct platform_device *pdev)
252252
return -ENOMEM;
253253

254254
card->dev = &pdev->dev;
255-
platform_set_drvdata(pdev, card);
256255
snd_soc_card_set_drvdata(card, machine);
257256

258257
machine->gpio_spkr_en = of_get_named_gpio(np, "nvidia,spkr-en-gpios",

sound/soc/tegra/tegra_wm9712.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ static int tegra_wm9712_driver_probe(struct platform_device *pdev)
8181
return -ENOMEM;
8282

8383
card->dev = &pdev->dev;
84-
platform_set_drvdata(pdev, card);
8584
snd_soc_card_set_drvdata(card, machine);
8685

8786
machine->codec = platform_device_alloc("wm9712-codec", -1);

sound/soc/tegra/trimslice.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ static int tegra_snd_trimslice_probe(struct platform_device *pdev)
127127
return -ENOMEM;
128128

129129
card->dev = &pdev->dev;
130-
platform_set_drvdata(pdev, card);
131130
snd_soc_card_set_drvdata(card, trimslice);
132131

133132
trimslice_tlv320aic23_dai.codec_of_node = of_parse_phandle(np,

0 commit comments

Comments
 (0)