From patchwork Tue Feb 14 20:06:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9572745 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 BD6A8601E7 for ; Tue, 14 Feb 2017 20:08:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB32926E4D for ; Tue, 14 Feb 2017 20:08:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B01692840E; Tue, 14 Feb 2017 20:08:31 +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 5AF9B26E4D for ; Tue, 14 Feb 2017 20:08:31 +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=yrOrN94f4Z4WtCddBdwTc0ThbDEm6jTMTpDur/JLKTU=; b=oaHF+N9euZhWV0 12t1hFJ1pG5Q1+333lS+lICc6bKQ+yFIKNIViW0HMwGpL0Byta7BSnU9jCie3gYy0Q0/NlmfndePi g+4rN7KCT5DBb1Qwoq4XikrdP164xx83DUwot2XHUUXf/S9WD2zH76qNBCyDm0Z9j6qcZEziuFKJI 6cuoqb9Y41lzM602qFOCBM2E2Y1YpUsV8N22o4uWVnVmjYtpK9ARzFqxPHgSb4mHVKk6I1/gdKTIl b2mjJyFSEm7AwkM8mksOjta151TVrI05gyqA4kueeU3mwndYZQgSNgrpz4+ix6ZCTwtqmnkA53y6u M6UAdOV9H+dxBngWckBw==; 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 1cdjOj-0002Hj-Nu; Tue, 14 Feb 2017 20:08:25 +0000 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cdjOR-0001mt-AW for linux-amlogic@lists.infradead.org; Tue, 14 Feb 2017 20:08:17 +0000 Received: by mail-wr0-x244.google.com with SMTP id o16so28927707wra.2 for ; Tue, 14 Feb 2017 12:07:47 -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=uJVtNw59wczofDQRsZxdF9LKQfxesWsRfmCkvrD8ZLo=; b=Kf1tCekBlH2lADsyNlFzKWcG9Uhr+NFZ3oiOfcr3HrblGOZeWbvy+oSUhqxhH6LYEU cuW9V65iVqZri3bWohqjfS7AbB8yKchgwePV6S2+8uN4yrG2AJ7ApRDe6MOcyzCk2tHV 2I5H6tuE+9kdAzahAu70hqJPsUVuQDL6pFk/UIAz0KdiZa00snBQQGjjMQvZjOVJZb4D ArwYI6llRdv8lS2QqHLO4B0Ipb7XmeNOG7QQrT5Bjpht3ANcooLvsKewQWj98JxgqyaC +igbktCOgAaHhikv9F7dRwTIjokoJlFhg3d6ExOE6zNobAmydFsPCmKDzPDl9nNgHlFv HM9g== 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=uJVtNw59wczofDQRsZxdF9LKQfxesWsRfmCkvrD8ZLo=; b=DNzIUA+ROTeWDiWbYvTBSLgJLst0OT4QvBAbVLuXg7ftioaSMvwPIgq7qUGJTQ8za6 0w3JJHPxaP5s/65jZYKXv+ergAUVJHS6vbiSvt63QJdOxo8xQ3F1ZHtCCqkmQWuhlx8Z 7vUGkyGfmAVizFHVRF6uLfF6zbyTs6bnoy65Q/mT7OlAJRXIvW50GWFtFtSERKUwWXx1 ina1/Yr5uJZ5dXpJlQ8gz0i3N7Ou2nnTWHnxX6Cq8Y77IoZwB2kkRjmsFsJlXYBGbCAS tdyYDrT7CAaYFkmm47mAOKeZcOvNoss0puJlah1IoiFEHdQhU7JQe/OH3L4kRVwCsrvJ AvqQ== X-Gm-Message-State: AMke39m12MrIx+QqXaofsw0dggaM6EGoH0JgqAA/rY8s5p3EsNJXLq/r2EnJemeYb239lw== X-Received: by 10.223.151.205 with SMTP id t13mr26832571wrb.9.1487102865896; Tue, 14 Feb 2017 12:07:45 -0800 (PST) Received: from ?IPv6:2003:c6:ebdc:4000:9533:a20:55f1:fb4b? (p200300C6EBDC400095330A2055F1FB4B.dip0.t-ipconnect.de. [2003:c6:ebdc:4000:9533:a20:55f1:fb4b]) by smtp.googlemail.com with ESMTPSA id 39sm2044106wrv.55.2017.02.14.12.07.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Feb 2017 12:07:45 -0800 (PST) From: Heiner Kallweit Subject: [PATCH 12/18] mmc: meson-gx: remove member parent_mux from struct meson_host To: Ulf Hansson , Kevin Hilman References: <420b75a9-b8c2-b3d7-ae60-3ed8a5a18ead@gmail.com> Message-ID: Date: Tue, 14 Feb 2017 21:06:53 +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: <420b75a9-b8c2-b3d7-ae60-3ed8a5a18ead@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170214_120807_797173_AF66253E X-CRM114-Status: GOOD ( 11.16 ) 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: Carlo Caione , 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 --- 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 d05ffe8a..74ceda75 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -131,7 +131,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; @@ -242,19 +241,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 */