ASoC: tegra: Remove unnecessary function call
authorDonglin Peng <dolinux.peng@gmail.com>
Sun, 20 Aug 2017 06:02:17 +0000 (14:02 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 21 Aug 2017 17:15:57 +0000 (18:15 +0100)
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>
sound/soc/tegra/tegra_alc5632.c
sound/soc/tegra/tegra_max98090.c
sound/soc/tegra/tegra_rt5640.c
sound/soc/tegra/tegra_rt5677.c
sound/soc/tegra/tegra_sgtl5000.c
sound/soc/tegra/tegra_wm8753.c
sound/soc/tegra/tegra_wm8903.c
sound/soc/tegra/tegra_wm9712.c
sound/soc/tegra/trimslice.c

index 0509902512ccd38a02376c0dc41a603d75f9a572..053fe4c5ed4c4cb6cb4f6fb5f5fff66f56676130 100644 (file)
@@ -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);
index c34a54d6e8121b9a6ba6c2b996112908eac25778..41feee9beb1281d325524faa727e99856b632ed2 100644 (file)
@@ -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);
index 93a356802345aeefd00c4171fd55032c9802e15c..02f27fe143246adba2d7f181aea8d7fbeb5154b5 100644 (file)
@@ -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(
index ebf58d0e0f10b222c70d3db17ffec334c191358c..3dbf0e1350c176b8c86253e57e6bac0a4fc7dbb6 100644 (file)
@@ -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);
index 6dda01f6998349d6d6f80d629af08480392bf776..45a4aa9d2a479a2c5ff82ac39ec06c30bf0952d2 100644 (file)
@@ -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");
index d0ab0026a4cd879e906d388979d0f02af52d0c56..23a810e3bacc01c893be09e51c605c10d904cccd 100644 (file)
@@ -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");
index dbfb49298ae8bea177237482f9d8dc58169bdf1e..d4a4a2be8b427908d18dcf900828897d01bc9c48 100644 (file)
@@ -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",
index c9cd2243262715ecfd929b44c6e7c99dee1d7aac..864a3345972e5a17421ed904df58d61abf650338 100644 (file)
@@ -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);
index c9dcad9bb93123b6b901ad3a3db33bfad0f3b19e..99bcdd979eb2955cb484f773cbb1c1dcb6a830b4 100644 (file)
@@ -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,