ASoC: simple-card: Remove useless casts
authorJean-Francois Moine <moinejf@free.fr>
Sun, 9 Nov 2014 11:38:56 +0000 (12:38 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 10 Nov 2014 19:02:02 +0000 (19:02 +0000)
There is no need to cast the cpu_of_node or codec_of_node of the
dai_links when calling of_put_node.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/generic/simple-card.c
sound/soc/samsung/odroidx2_max98090.c
sound/soc/ux500/mop500.c

index cd49d5010e14ffca5911e38b5e2c4ecac4b375d3..3e3fec4e5c4ea5f15f1c2e1ee6ebeccbc9600a38 100644 (file)
@@ -457,16 +457,13 @@ static int asoc_simple_card_unref(struct platform_device *pdev)
 {
        struct snd_soc_card *card = platform_get_drvdata(pdev);
        struct snd_soc_dai_link *dai_link;
-       struct device_node *np;
        int num_links;
 
        for (num_links = 0, dai_link = card->dai_link;
             num_links < card->num_links;
             num_links++, dai_link++) {
-               np = (struct device_node *) dai_link->cpu_of_node;
-               of_node_put(np);
-               np = (struct device_node *) dai_link->codec_of_node;
-               of_node_put(np);
+               of_node_put(dai_link->cpu_of_node);
+               of_node_put(dai_link->codec_of_node);
        }
        return 0;
 }
index 3c8f60423e825d401e659e459afed3f00642799a..d7640e72cb1d7d7fead83054858292ce2e92be10 100644 (file)
@@ -153,8 +153,8 @@ static int odroidx2_audio_remove(struct platform_device *pdev)
 
        snd_soc_unregister_card(card);
 
-       of_node_put((struct device_node *)odroidx2_dai[0].cpu_of_node);
-       of_node_put((struct device_node *)odroidx2_dai[0].codec_of_node);
+       of_node_put(odroidx2_dai[0].cpu_of_node);
+       of_node_put(odroidx2_dai[0].codec_of_node);
 
        return 0;
 }
index b3b66aa98dce7d8b3f6844eb9f65a7d59a728cd8..ea9ba2844510daf8adec475deb612a129bcc477c 100644 (file)
@@ -64,11 +64,9 @@ static void mop500_of_node_put(void)
 
        for (i = 0; i < 2; i++) {
                if (mop500_dai_links[i].cpu_of_node)
-                       of_node_put((struct device_node *)
-                               mop500_dai_links[i].cpu_of_node);
+                       of_node_put(mop500_dai_links[i].cpu_of_node);
                if (mop500_dai_links[i].codec_of_node)
-                       of_node_put((struct device_node *)
-                               mop500_dai_links[i].codec_of_node);
+                       of_node_put(mop500_dai_links[i].codec_of_node);
        }
 }