From patchwork Thu Feb 16 19:41:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9578255 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EBDA160586 for ; Thu, 16 Feb 2017 19:43:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE1332866A for ; Thu, 16 Feb 2017 19:43:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D30EA28670; Thu, 16 Feb 2017 19:43:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8F5182866F for ; Thu, 16 Feb 2017 19:43:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:References:To:Subject:From:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=e3k1Ua6TrXcHS0zbhfn08a1MT4WeIs7sqr4S/RL1jdE=; b=ga+bmpKhfGK4zw OAngI7s5PoQFrpOG1eRsJmzywVfwHRxhHu0NGDi2yKBkEp8R9IQeJjBgWLBHiP4IAyrXiMuyXs1tN L/ASBiuZUz0U/UbBgrqoed6DfdkcFgWOSBDyzOsWzsTYHk8B+OFtDyowF6tYpebrGjGrLAQFwxrWk N2Ws3rnb5cOZ/IPNrQPHCdWDCRHIRlqt7h/aWVAMEUt0OE1A5wM+XOr1c9trGg+gUrsszhLdf5CvT bTU+S5/Ny39KEQ6GMTdaQhRWAloLQvwzdKxXj9Y6Jz0GyN5gpNIjFq1tDdHI6siw9Pt3JdbeweFly 33462A0iZlo/i5uF6HlQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ceRxt-0006sL-6s; Thu, 16 Feb 2017 19:43:41 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ceRxh-0006fS-Q8 for linux-amlogic@lists.infradead.org; Thu, 16 Feb 2017 19:43:34 +0000 Received: by mail-wm0-x244.google.com with SMTP id r18so4677296wmd.3 for ; Thu, 16 Feb 2017 11:43:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:references:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=TV9BSHOyrSOta7zGIGGIZHotMqaUth64ig541Pf+ViE=; b=sV5wyQjm4uYGtHEJ7p5Z9JwSRCkqeWuwdnqqHdfimzxX88DprB7e9pHmON7XXz87i7 5V6heBWovfSJeVDSW/fweP96UTAV1WJzxvU9jSiSk0I8FQP3f8SDjB6RZ78Q2I6E664F tuTVA774RtLtwrZgWjuFGccTiN1Tr7TuwxPtM9mBMucsDKiB7cwCsP0+49xkiOsW+neL ottUexMwUV44XXyykCENiy+++iZAOQZAxDyhq1rXlbw4fVSNQ+fNskmdiZk+8A+hllQM x/HJRze5T5jqcFeI0UeqZ8JL4lU4093VnTqJuGUbWnLxQwCFgyBBA/zL3WSpz3PsXgHN m+lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=TV9BSHOyrSOta7zGIGGIZHotMqaUth64ig541Pf+ViE=; b=sZIqUbuUBS88UthcsHD/vbDBCNVrkgehRytD6AWdRhSjiVquqe2kqfdICSQKb9Yc9E cTUvml28SjOXGIEksDsdE5r5NGkViYnqaWiGDukvUVm+O+FTWLf7vEzOIESRg1KXZtxf fsnWphLh7ChJ8gV5ROSsbVAbuptUmhODUmbMdI0bW5Ohk1FdaNdTOjdWfwN2RlhgC0+N 3OP4mT+KSQJSBqwhmC767RaJqyVnQe+xL5xt/+IdXclCtcbsnlkA2tmcApj7uOTn2uWk sfqnDvaKvtahWlRfllt2BEwOo54DOGYOhJKiasXwZQRX8iOeHAvENQ0Zj+lqZ3CEd2Tt z1Tg== X-Gm-Message-State: AMke39nNzMnaKmBK0makrz38hZ7qX5+wmtnYh9upaPN01qBlrMxBgFKKdKHwFanKzI3leg== X-Received: by 10.28.54.226 with SMTP id y95mr3842158wmh.105.1487274188011; Thu, 16 Feb 2017 11:43:08 -0800 (PST) Received: from ?IPv6:2003:c6:ebdc:4000:f02a:ffb3:d41d:abac? (p200300C6EBDC4000F02AFFB3D41DABAC.dip0.t-ipconnect.de. [2003:c6:ebdc:4000:f02a:ffb3:d41d:abac]) by smtp.googlemail.com with ESMTPSA id 136sm1375509wms.32.2017.02.16.11.43.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Feb 2017 11:43:07 -0800 (PST) From: Heiner Kallweit Subject: [PATCH v2 5/9] mmc: meson-gx: remove member parent_mux from struct meson_host To: Ulf Hansson , Kevin Hilman References: <7d5263e2-9325-dedb-a5f6-954c4a09e977@gmail.com> Message-ID: <4c36e7b3-002d-df69-f32e-e3ba5c100ff0@gmail.com> Date: Thu, 16 Feb 2017 20:41:38 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <7d5263e2-9325-dedb-a5f6-954c4a09e977@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170216_114330_233058_096E3DB1 X-CRM114-Status: GOOD ( 11.12 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, "linux-mmc@vger.kernel.org" Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Member mux_parent isn't used outside meson_mmc_clk_init. So remove it and replace it with a local variable in meson_mmc_clk_init. Signed-off-by: Heiner Kallweit Acked-by: Kevin Hilman --- v2: - added acked-by --- drivers/mmc/host/meson-gx-mmc.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index ea2db3ce..68e76fa8 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -130,7 +130,6 @@ struct meson_host { struct clk *core_clk; struct clk_mux mux; struct clk *mux_clk; - struct clk *mux_parent[MUX_CLK_NUM_PARENTS]; unsigned long current_clock; struct clk_divider cfg_div; @@ -247,19 +246,18 @@ static int meson_mmc_clk_init(struct meson_host *host) /* get the mux parents */ for (i = 0; i < MUX_CLK_NUM_PARENTS; i++) { + struct clk *clk; char name[16]; snprintf(name, sizeof(name), "clkin%d", i); - host->mux_parent[i] = devm_clk_get(host->dev, name); - if (IS_ERR(host->mux_parent[i])) { - ret = PTR_ERR(host->mux_parent[i]); - if (PTR_ERR(host->mux_parent[i]) != -EPROBE_DEFER) + clk = devm_clk_get(host->dev, name); + if (IS_ERR(clk)) { + if (clk != ERR_PTR(-EPROBE_DEFER)) dev_err(host->dev, "Missing clock %s\n", name); - host->mux_parent[i] = NULL; - return ret; + return PTR_ERR(clk); } - mux_parent_names[i] = __clk_get_name(host->mux_parent[i]); + mux_parent_names[i] = __clk_get_name(clk); } /* create the mux */