From patchwork Sun Nov 9 11:38:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Francois Moine X-Patchwork-Id: 5261741 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7494EC11AC for ; Sun, 9 Nov 2014 18:45:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9410820136 for ; Sun, 9 Nov 2014 18:45:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9ED502012D for ; Sun, 9 Nov 2014 18:45:43 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XnXS8-0003lZ-3Q; Sun, 09 Nov 2014 18:43:08 +0000 Received: from smtp4-g21.free.fr ([212.27.42.4]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XnXS2-0003i9-5a for linux-arm-kernel@lists.infradead.org; Sun, 09 Nov 2014 18:43:02 +0000 Received: from localhost (unknown [IPv6:2a01:e35:2f5c:9de0:212:bfff:fe1e:9ce4]) by smtp4-g21.free.fr (Postfix) with ESMTP id 239354C804F; Sun, 9 Nov 2014 19:40:28 +0100 (CET) X-Mailbox-Line: From 33e64705e81810201349a09ac22d5e1f66e035e0 Mon Sep 17 00:00:00 2001 Message-Id: <33e64705e81810201349a09ac22d5e1f66e035e0.1415557680.git.moinejf@free.fr> In-Reply-To: References: From: Jean-Francois Moine Date: Sun, 9 Nov 2014 12:38:56 +0100 Subject: [PATCH 2/2] ASoC: Remove useless casts To: Russell King , Grant Likely X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141109_104302_360416_F1FBF20D X-CRM114-Status: GOOD ( 13.11 ) X-Spam-Score: 0.4 (/) Cc: devicetree@vger.kernel.org, Lars-Peter Clausen , linux-kernel@vger.kernel.org, Rob Herring , Mark Brown , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, DATE_IN_PAST_06_12, FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- sound/soc/generic/simple-card.c | 7 ++----- sound/soc/samsung/odroidx2_max98090.c | 4 ++-- sound/soc/ux500/mop500.c | 6 ++---- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index cd49d50..3e3fec4 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -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; } diff --git a/sound/soc/samsung/odroidx2_max98090.c b/sound/soc/samsung/odroidx2_max98090.c index 3c8f604..d7640e7 100644 --- a/sound/soc/samsung/odroidx2_max98090.c +++ b/sound/soc/samsung/odroidx2_max98090.c @@ -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; } diff --git a/sound/soc/ux500/mop500.c b/sound/soc/ux500/mop500.c index b3b66aa..ea9ba284 100644 --- a/sound/soc/ux500/mop500.c +++ b/sound/soc/ux500/mop500.c @@ -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); } }