From patchwork Mon Jun 16 14:33:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 4359631 Return-Path: X-Original-To: patchwork-alsa-devel@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 682C4BEEAA for ; Mon, 16 Jun 2014 14:35:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 86BF620279 for ; Mon, 16 Jun 2014 14:35:42 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 555022025A for ; Mon, 16 Jun 2014 14:35:41 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 05B8426546D; Mon, 16 Jun 2014 16:35:39 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 532BF265455; Mon, 16 Jun 2014 16:35:35 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 87DD7265461; Mon, 16 Jun 2014 16:35:34 +0200 (CEST) Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by alsa0.perex.cz (Postfix) with ESMTP id 7919F265455 for ; Mon, 16 Jun 2014 16:35:26 +0200 (CEST) MIME-version: 1.0 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N790093IN5MKCC0@mailout2.samsung.com> for alsa-devel@alsa-project.org; Mon, 16 Jun 2014 23:34:34 +0900 (KST) X-AuditID: cbfee61b-b7fbb6d000001be3-a0-539f007a89cb Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 97.CE.07139.A700F935; Mon, 16 Jun 2014 23:34:34 +0900 (KST) Received: from amdc1344.digital.local ([106.116.147.32]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N7900KFWN4CDN30@mmp2.samsung.com>; Mon, 16 Jun 2014 23:34:34 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Date: Mon, 16 Jun 2014 16:33:46 +0200 Message-id: <1402929226-5547-1-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrDLMWRmVeSWpSXmKPExsVy+t9jQd0qhvnBBnd6eC2uXDzEZDH14RM2 i8u75rBZHH7TzurA4rHhcxObx6ZVnWwefVtWMXp83iQXwBLFZZOSmpNZllqkb5fAlTH3WQ9b wWPeihUblzI3ME7i7mLk5JAQMJGYsHc9G4QtJnHhHojNxSEkMJ1RYtWPq6wgCV4BQYkfk++x dDFycDALyEscuZQNEmYWUJeYNG8RM0R9B5PE9s5OJpAEm4ChRO/RPkYQWwRo6O05ncwQDTkS s7t7wZYJC4RKrL2+lwXEZhFQlWjcfIMZZD6vgKvE/0VZIKaEgILEnEk2Exj5ZiE5YhbCEbOQ HLGAkXkVo2hqQXJBcVJ6rpFecWJucWleul5yfu4mRnAYPpPewbiqweIQowAHoxIP7wTHecFC rIllxZW5hxglOJiVRHj17gCFeFMSK6tSi/Lji0pzUosPMUpzsCiJ8x5stQ4UEkhPLEnNTk0t SC2CyTJxcEo1MLK2zlQNNeJimdtVfu/YOu+HEcLL9ANOPl3bN73H0+9bi8hVNQ6lN3s3MK/e tEq5qvrpaj1+gxnBTpvWJ28XEdrNp9TlVv4oS6hXzVZ4gtQLF/8MtVehfbcWCvmxfm8MVLAJ ju8P4WdcGu3Yd1a6c2H6xpzaKkmfm43H5dPnSgnxswg+VIpWYinOSDTUYi4qTgQAH4mXkD8C AAA= Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Sylwester Nawrocki Subject: [alsa-devel] [PATCH/RFC] ASoC: Drop const from struct snd_soc_dai_link *of_node members X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Dropping the const qualifiers prevents "passing argument 1 of ‘of_node_put’ discards ‘const’ qualifier from pointer target type" type warnings when compiling the code dropping reference to cpu_of_node, codec_of_node or platform_of_node with with an of_node_put() function call. This lets us to avoid casting to struct device_node * or caching variables internally in drivers just to be able to properly drop a reference to the OF node on clean up paths. Signed-off-by: Sylwester Nawrocki --- include/sound/soc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 1.7.9.5 diff --git a/include/sound/soc.h b/include/sound/soc.h index ed9e2d7..a8d4b79 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -881,7 +881,7 @@ struct snd_soc_dai_link { * only for codec to codec links, or systems using device tree. */ const char *cpu_name; - const struct device_node *cpu_of_node; + struct device_node *cpu_of_node; /* * You MAY specify the DAI name of the CPU DAI. If this information is * omitted, the CPU-side DAI is matched using .cpu_name/.cpu_of_node @@ -893,7 +893,7 @@ struct snd_soc_dai_link { * DT/OF node, but not both. */ const char *codec_name; - const struct device_node *codec_of_node; + struct device_node *codec_of_node; /* You MUST specify the DAI name within the codec */ const char *codec_dai_name; /* @@ -902,7 +902,7 @@ struct snd_soc_dai_link { * do not need a platform. */ const char *platform_name; - const struct device_node *platform_of_node; + struct device_node *platform_of_node; int be_id; /* optional ID for machine driver BE identification */ const struct snd_soc_pcm_stream *params;