From patchwork Tue Dec 24 00:58:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 182422 Delivered-To: patch@linaro.org Received: by 2002:a92:a146:0:0:0:0:0 with SMTP id v67csp1083131ili; Mon, 23 Dec 2019 16:58:51 -0800 (PST) X-Google-Smtp-Source: APXvYqzAvfFqDc1qkkd4/yU/KnDH+zW/bLzoMlwvUMAO7hve6HZzl59WYmgBCcdYVfJ9vWX/8ay3 X-Received: by 2002:a9d:630d:: with SMTP id q13mr33606233otk.31.1577149131536; Mon, 23 Dec 2019 16:58:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577149131; cv=none; d=google.com; s=arc-20160816; b=sJEaUNpXGHRtucb1ASEfCQ3PxxnfzN2JkzZIaSUgYK8G2IOOQthBaL/0dX0/+gWZz1 KUTGsNmJACi8AzJYfdwHlRqCwpqSuA8wibea/up5t2TOsGVJ72OWbGAsCli1r4gbIY6v CXZjtwfTMS7KrH9OkAzj+VQNkkrx0OFg1V8bCux6Tqh8cntkY5ROnsfXqEnq4mN8+nrA hXQXEXLIOw1wYkjeVXgerw2KiAutuexs3Esb0pPhxfDlMv9xfvVteO6i3pvs436jCiWR YSQE/87d1vGtn23WSFGACTC1T6ViPpwcxXuYUKn/TqlkLCbKY4j4wqyhmd1tFSV3E6pA 7u9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=ptvB2VDB24XgjGGsapMHLcxkUeAkQ2BNrHSJcT9wJnA=; b=v6n2K/MgjI6zuv3jACZ7VlJEAzcOUbLTTNLMrzTLurZAfN3XHs8Fqp/tA8T3jn/k3W UcREL2GgMjOPGHa7+JmmsAg1BEPJnO1XM3Y0tlaEIHkgc0BcEjcbvSm3Civ5ZWPoxRfn 2Vs9dfTyjRp77CZwca55FmxgTubzrZkpc9JeJ5Lx1b+s8kblgN/I7ONXc8ZOtb+fHmyk GF2j/ktopzTmcQUiy8AlBJ+pl2/z3yZGdY2ObUXBXkDeGzbIkITXU7oEi+dV3d0FgyYU hdZj1kBqHcVws3laB8BwHpSctJrWpR6wvKzQUfO5DWniodLZUC+fSZkW6Jv5TsMI2Ege ygHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t17si2797245oth.149.2019.12.23.16.58.51; Mon, 23 Dec 2019 16:58:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726877AbfLXA6t (ORCPT + 2 others); Mon, 23 Dec 2019 19:58:49 -0500 Received: from mx.socionext.com ([202.248.49.38]:23638 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726833AbfLXA6t (ORCPT ); Mon, 23 Dec 2019 19:58:49 -0500 Received: from unknown (HELO iyokan-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 24 Dec 2019 09:58:47 +0900 Received: from mail.mfilter.local (m-filter-1 [10.213.24.61]) by iyokan-ex.css.socionext.com (Postfix) with ESMTP id BD1AF603AB; Tue, 24 Dec 2019 09:58:47 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Tue, 24 Dec 2019 09:59:27 +0900 Received: from plum.e01.socionext.com (unknown [10.213.132.32]) by kinkan.css.socionext.com (Postfix) with ESMTP id 29E371A01CF; Tue, 24 Dec 2019 09:58:47 +0900 (JST) From: Kunihiko Hayashi To: Mark Brown , linux-spi@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Keiji Hayashibara , Masami Hiramatsu , Jassi Brar , Kunihiko Hayashi Subject: [PATCH 2/5] spi: uniphier: Change argument of irq functions to private structure Date: Tue, 24 Dec 2019 09:58:24 +0900 Message-Id: <1577149107-30670-3-git-send-email-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1577149107-30670-1-git-send-email-hayashi.kunihiko@socionext.com> References: <1577149107-30670-1-git-send-email-hayashi.kunihiko@socionext.com> Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org This changes each argument of functions uniphier_irq_{enable,disable}() to uniphier_spi_priv because these functions are used not only for spi_device but also for the entire controller. Signed-off-by: Kunihiko Hayashi --- drivers/spi/spi-uniphier.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- 2.7.4 diff --git a/drivers/spi/spi-uniphier.c b/drivers/spi/spi-uniphier.c index ce9b301..3859649 100644 --- a/drivers/spi/spi-uniphier.c +++ b/drivers/spi/spi-uniphier.c @@ -93,9 +93,9 @@ static inline unsigned int bytes_per_word(unsigned int bits) return bits <= 8 ? 1 : (bits <= 16 ? 2 : 4); } -static inline void uniphier_spi_irq_enable(struct spi_device *spi, u32 mask) +static inline void uniphier_spi_irq_enable(struct uniphier_spi_priv *priv, + u32 mask) { - struct uniphier_spi_priv *priv = spi_master_get_devdata(spi->master); u32 val; val = readl(priv->base + SSI_IE); @@ -103,9 +103,9 @@ static inline void uniphier_spi_irq_enable(struct spi_device *spi, u32 mask) writel(val, priv->base + SSI_IE); } -static inline void uniphier_spi_irq_disable(struct spi_device *spi, u32 mask) +static inline void uniphier_spi_irq_disable(struct uniphier_spi_priv *priv, + u32 mask) { - struct uniphier_spi_priv *priv = spi_master_get_devdata(spi->master); u32 val; val = readl(priv->base + SSI_IE); @@ -346,12 +346,12 @@ static int uniphier_spi_transfer_one_irq(struct spi_master *master, uniphier_spi_fill_tx_fifo(priv); - uniphier_spi_irq_enable(spi, SSI_IE_RCIE | SSI_IE_RORIE); + uniphier_spi_irq_enable(priv, SSI_IE_RCIE | SSI_IE_RORIE); time_left = wait_for_completion_timeout(&priv->xfer_done, msecs_to_jiffies(SSI_TIMEOUT_MS)); - uniphier_spi_irq_disable(spi, SSI_IE_RCIE | SSI_IE_RORIE); + uniphier_spi_irq_disable(priv, SSI_IE_RCIE | SSI_IE_RORIE); if (!time_left) { dev_err(dev, "transfer timeout.\n");