From patchwork Sat Mar 4 12:24:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9603909 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 10557602B4 for ; Sat, 4 Mar 2017 12:39:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 007442843F for ; Sat, 4 Mar 2017 12:39:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E949928555; Sat, 4 Mar 2017 12:39:03 +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 E034E2843F for ; Sat, 4 Mar 2017 12:39:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751855AbdCDMjB (ORCPT ); Sat, 4 Mar 2017 07:39:01 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:34500 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751858AbdCDMi5 (ORCPT ); Sat, 4 Mar 2017 07:38:57 -0500 Received: by mail-wr0-f193.google.com with SMTP id u48so16254202wrc.1 for ; Sat, 04 Mar 2017 04:38:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=s4zGuPmvnQI5JUhWTGaurYiUAVwQgvg6WyJu5x/6zSU=; b=Thkm3pSM816qBoApSQSPp0oKPZCPmWfwqiMnIQGTErDEVgk5AnWVQz0EMEGUZlOLeD q1zoF8ABe2vDM/we5uusNuX2lO3HSG2HcSjhQCibHO582ObYHbvGWYl1n7A1ambWoFVW gVDPxQXpWwyaD1iY/nyE9TCagCQCa8n7KMEcOTyNZmp0ntQEMYb7hS3LMK8/hYSSzDTf MeCO9niP+JYCR8CXGMp3GyCT8a7JGu0+Zn01vcRV5jhHU7YRHnSTItqSBneSctT9tNW0 0UBmZUlgrV4ZcH+Zo0X4xTfIA85VcsAk2X9UMssU1s69Rza8E7F3k79/JfDnj5u2hpg7 amdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=s4zGuPmvnQI5JUhWTGaurYiUAVwQgvg6WyJu5x/6zSU=; b=RFe1tAH0UM1lxyydabXJ/PZJ07mLzA/rF8tpuG17YTIOo4pk4P/Uu3MujNVRBfNfRa QR/PBOXk11MybgabSgZwMtJNLrgZQUqibtXyJc795/O0+0eapeVbajEGoobFSd8d3eaS AG7TDLciHs2AsH+5VK+5xHaV2d+qDaQz06v8R/Qev1Fy0NDCK4gAMIvBT7xKE0dT+hSE qa2vCrtTSuK4zcTYEpLktxV3ncnmeTt8qxzQr3gy4oBRSVSPP1cgZ0Y19CIfzVRQ/oxJ QD8h5roTOFdJSWDEQBNODMVd8LH6r4AsdBNAYttwYUZBlkTLn8EbM83SiB2/AGa5TIUp 49vA== X-Gm-Message-State: AMke39kppiG7WNQiU3trOMM20C7Z8hxPxnso9uKOdES2jxsyNA41cJooGioVfGoaidAvDg== X-Received: by 10.223.177.151 with SMTP id q23mr1048078wra.65.1488631098888; Sat, 04 Mar 2017 04:38:18 -0800 (PST) Received: from ?IPv6:2003:c6:ebdc:4000:98cd:c51c:6f4e:443? (p200300C6EBDC400098CDC51C6F4E0443.dip0.t-ipconnect.de. [2003:c6:ebdc:4000:98cd:c51c:6f4e:443]) by smtp.googlemail.com with ESMTPSA id p93sm18908053wrc.67.2017.03.04.04.38.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Mar 2017 04:38:18 -0800 (PST) Subject: [PATCH v5 5/10] mmc: meson-gx: remove member parent_mux from struct meson_host To: Ulf Hansson , Kevin Hilman References: Cc: "linux-mmc@vger.kernel.org" , linux-amlogic@lists.infradead.org From: Heiner Kallweit Message-ID: Date: Sat, 4 Mar 2017 13:24:09 +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: 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 --- v2: - added acked-by v3: - no changes v4: - no changes v5: - no changes --- 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 */