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: 9572701 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 3E99060589 for ; Tue, 14 Feb 2017 20:07:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C7E52840E for ; Tue, 14 Feb 2017 20:07:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3173728415; Tue, 14 Feb 2017 20:07:55 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3499C2841C for ; Tue, 14 Feb 2017 20:07:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753941AbdBNUHs (ORCPT ); Tue, 14 Feb 2017 15:07:48 -0500 Received: from mail-wr0-f196.google.com ([209.85.128.196]:34246 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754656AbdBNUHr (ORCPT ); Tue, 14 Feb 2017 15:07:47 -0500 Received: by mail-wr0-f196.google.com with SMTP id c4so3370888wrd.1 for ; Tue, 14 Feb 2017 12:07:46 -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=hwW5SpzCZhLEMcqldbytxVV4Clyi5ols+o7b23MBOn1Z3nP9Z6MlR4LDD3LVPmgWzB YkcGqyMPY6wh9cOVIG0z0aJpSU5LrTpGeJc/7EV9WJ06SDn4W7Cdb76zVMXcbS/Oen+q kYg316dYsGsW0z+gkOpS1maOs34bNwHOfzaWEJ32096pjBDIZeujcwLPOpG/BE1k+SeP iB46wFztEB83mnfFunp7Pj5Km+v7U0MVrwgDtfduEKRF0N5lKite+F/gYYcbHbDOQuPI xbG9fk5fK1aogwJRk46G4aejkvVrgo3ZLDzsk38M8En8JqPDzRcjHBFa29z8kQtIYfyz 9k7w== X-Gm-Message-State: AMke39nqsL68e+qfVrkXdOWC+DCCj9w3kOmxM12TFnb3MbU5W9vV2ituNqE9m7nUH6fTQg== 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> Cc: Carlo Caione , "linux-mmc@vger.kernel.org" , linux-amlogic@lists.infradead.org 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> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.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 */