Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3492475imu; Sun, 11 Nov 2018 16:19:44 -0800 (PST) X-Google-Smtp-Source: AJdET5fXJSt9gV1zvmlPg+KalPeHnxv4IZwLKvOJMbtaiC2vq86Oc1j15SJ94uCJ4ZZI+n93wluO X-Received: by 2002:a65:5c81:: with SMTP id a1-v6mr15336730pgt.390.1541981983965; Sun, 11 Nov 2018 16:19:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541981983; cv=none; d=google.com; s=arc-20160816; b=DrM+xSUQy6x/FIEQwuviFKTWWxY5sfi+WwEkKf469HG+qV18/yDcdy6DOx7IqfWtun L3wIZybAiFtTm/z3DuiOqUtrYhbj3nD7/aXTLXk6HbvNqcK2pLGtFeftiCYBQ8jZbQ5r nYR5OiPVs6Qwysuf7o/GUPgdzB184jVPMDIW6HghX984v8RcegUi+iWHqBBud6ZoTcPE fGDg5QDTdwVM9eDQ6bvGXqQSjfhZNXKBZwJMSzv6tAFThv5xhDRZIcY+TYzREHr22qYb hJ6y6OEcJU+2I5/Js71p3DKhngD3+8Hlp9Bk/KU1Ksx5++HtaWj/C8iIGpSz3UC1hS94 XkmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UaB0+uVYlZR9wXM8JqgQcd6ifAU+aqeKSk7Ujk0tdXE=; b=JYmwIiHdBGCRPlWdvRXM7IAidEpM5t/oOo9zIV4YOpvn85VjXK8I6a4FkYpnvr+6r9 M/M18/9rAPGMjJkRgqDtC6qV8lkgfAtr9K4RlzS9NogSjcfaC10IVMFgfJZQGTOaTYIQ b5im+qa4OdVJI0x+MO8XbyZinhmeelsYkkTU5SeMFHa537hSKObBIFgDtkl157b8osfI czAXDM4gjboX6v/3cqskoqi+AAXDLHRPlDLQ66gxCwPUuLpfXVEFNCgvszVGSdjtWbPj bt+OdcFwNDhmFi29Yf1kymr2FyS1Fcj8+qY3jBXquQpEFtFQ3ZHKzVRspHS2huBUmoy4 5arA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=shEHo6iX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 b1-v6si13907860pgw.151.2018.11.11.16.19.28; Sun, 11 Nov 2018 16:19:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=shEHo6iX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729936AbeKLIQ5 (ORCPT + 99 others); Mon, 12 Nov 2018 03:16:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:58420 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729917AbeKLIQ4 (ORCPT ); Mon, 12 Nov 2018 03:16:56 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6E0E821527; Sun, 11 Nov 2018 22:27:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975221; bh=THj1rSwX4VFd+pnZMngCpUq9mDKO2297d6Yhj5E4EG4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=shEHo6iXIdjDbORqFwFTrs4U3vpugJx5PxSCVb2ZlmF/duvpV6VNEhuyeQvfW2hQU 1c6SMkMNk84qMzBY3AJhRIVv6wh1/Cufkv8HJUzeIEMvKPropxyyKPX11FHl6ZMJzp 4ObltwfUw73Q2FOwmgBgwzdkNc9pi33fu8yhFpls= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sascha Hauer , Janusz Uzycki , Linus Walleij , Sasha Levin Subject: [PATCH 4.19 003/361] gpio: mxs: Get rid of external API call Date: Sun, 11 Nov 2018 14:15:50 -0800 Message-Id: <20181111221620.601778585@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 833eacc7b5913da9896bacd30db7d490aa777868 ] The MXS driver was calling back into the GPIO API from its irqchip. This is not very elegant, as we are a driver, let's just shortcut back into the gpio_chip .get() function instead. This is a tricky case since the .get() callback is not in this file, instead assigned by bgpio_init(). Calling the function direcly in the gpio_chip is however the lesser evil. Cc: Sascha Hauer Cc: Janusz Uzycki Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/gpio/gpio-mxs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c index df30490da820..ea874fd033a5 100644 --- a/drivers/gpio/gpio-mxs.c +++ b/drivers/gpio/gpio-mxs.c @@ -18,8 +18,6 @@ #include #include #include -/* FIXME: for gpio_get_value(), replace this by direct register read */ -#include #include #define MXS_SET 0x4 @@ -86,7 +84,7 @@ static int mxs_gpio_set_irq_type(struct irq_data *d, unsigned int type) port->both_edges &= ~pin_mask; switch (type) { case IRQ_TYPE_EDGE_BOTH: - val = gpio_get_value(port->gc.base + d->hwirq); + val = port->gc.get(&port->gc, d->hwirq); if (val) edge = GPIO_INT_FALL_EDGE; else -- 2.17.1