Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3844404pxb; Mon, 8 Feb 2021 01:19:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJxCKWdKmoOeF5b8/1ZmaCjiwKP6+ar7kyKX7wRPAEXKHUrWS2UzL7X0OeAIec4tMo4mP4aN X-Received: by 2002:a05:6402:1cc1:: with SMTP id ds1mr1481298edb.10.1612775991382; Mon, 08 Feb 2021 01:19:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612775991; cv=none; d=google.com; s=arc-20160816; b=Ei5yNAtvqTW3q7Gq86U3jcKxVz+whDyIMBclCvwH0Ku+b5/L3TemLZswVHjF2spfD1 9Vz2MqUPrO1gg5b48xOMh6gjk1hG8v3yWtemhvY1hvPpJ95NOlo6ukoOlHbTTmpnDp5N ELN0vS59GCu+iGfb8al7cQPsVxFHEAoSClRdiY6vQ83368dAov1jnM6E6Sm2cg5iQHYF IIJqbvVPq8LhaTBwgARKGlopR2SBW1eSMPMyDf2zi7DOxIwbcImfx6CoWuJVPHoe+Lct MRl8yMU0q8tIRrDI8OgyxqyqI1Jw5kKXUMqJHs8oQUpKcBVfJSS+QSCE8zHNqi83ZNFK BG+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=2pFkqINr0Y+0qspaWIo/LNq9rkm2asqYiXR9MdoA6L4=; b=XsMXgRZnlib74B+KzzSF+2sFYh+lIt4CZ70qWVcXWquoHy/Wakz4TDQzQ2xNO95b3r uW7NepRsbzJuL5scW4nx3Clw0/8YchPNwf/rE6WUvPDrWHE7nsJJL91oi5nS+tVImuJR fJzGlX3CHUbd/cMmhFIBVgK/sg5VM3TBpXtWN4acLFY/pmmzA1MxNvMcbkGpdfubk02W YVIEZTNkT7MYXNvm0GC5cDUZXqwV0VHJDrTT/aT1JVNf4S+jpoQ3YOgTf2lt6rxO6Z8b C11PBDKkI1G/TNjRziXG4I/izH3lTSfzgMo9k/JzbxVmbmwXhkhj2PGqmgYNkw4IPL1j s0Hg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jg13si13219785ejc.126.2021.02.08.01.19.27; Mon, 08 Feb 2021 01:19:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231576AbhBHJRz (ORCPT + 99 others); Mon, 8 Feb 2021 04:17:55 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:12528 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231126AbhBHI7X (ORCPT ); Mon, 8 Feb 2021 03:59:23 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4DZ0JS3jdnzMTXW; Mon, 8 Feb 2021 16:56:56 +0800 (CST) Received: from huawei.com (10.69.192.56) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.498.0; Mon, 8 Feb 2021 16:58:35 +0800 From: Luo Jiaxing To: , , , , , CC: , , Subject: [PATCH for next v1 2/2] gpio: grgpio: Replace spin_lock_irqsave with spin_lock in grgpio_irq_handler() Date: Mon, 8 Feb 2021 16:57:57 +0800 Message-ID: <1612774677-56758-3-git-send-email-luojiaxing@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1612774677-56758-1-git-send-email-luojiaxing@huawei.com> References: <1612774677-56758-1-git-send-email-luojiaxing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is no need to use API with _irqsave in grgpio_irq_handler(), because it already be in a irq-disabled context. Signed-off-by: Luo Jiaxing --- drivers/gpio/gpio-grgpio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-grgpio.c b/drivers/gpio/gpio-grgpio.c index f954359..fa5aa31 100644 --- a/drivers/gpio/gpio-grgpio.c +++ b/drivers/gpio/gpio-grgpio.c @@ -195,11 +195,10 @@ static irqreturn_t grgpio_irq_handler(int irq, void *dev) { struct grgpio_priv *priv = dev; int ngpio = priv->gc.ngpio; - unsigned long flags; int i; int match = 0; - spin_lock_irqsave(&priv->gc.bgpio_lock, flags); + spin_lock(&priv->gc.bgpio_lock); /* * For each gpio line, call its interrupt handler if it its underlying @@ -215,7 +214,7 @@ static irqreturn_t grgpio_irq_handler(int irq, void *dev) } } - spin_unlock_irqrestore(&priv->gc.bgpio_lock, flags); + spin_unlock(&priv->gc.bgpio_lock); if (!match) dev_warn(priv->dev, "No gpio line matched irq %d\n", irq); -- 2.7.4