Received: by 2002:a17:90a:9103:0:0:0:0 with SMTP id k3csp11786973pjo; Thu, 2 Jan 2020 14:16:21 -0800 (PST) X-Google-Smtp-Source: APXvYqwz1w8LeYVEF64dYiuTSpdY2ILoNFpS/9Yrlc+d3uDNbXvFzubTT9Do7j6F2gMMAqdc4onI X-Received: by 2002:a05:6830:1d7b:: with SMTP id l27mr946747oti.251.1578003381417; Thu, 02 Jan 2020 14:16:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578003381; cv=none; d=google.com; s=arc-20160816; b=R0w1lR7Oy+ddm40eTHq00RPydBMmF3SXtnO3OeZswAGLXlMETOhW6kKy9l4BH+kb15 rmAUgt5qFE0gykH2P8w8JKNH5jMbOONOK4fUPTQjB7GoicBkzsrtg4r4yZP0ObshYWaf hB9gbo+1QnQpTEPxhdlmSsj7G1Jx1FB4vPjLDVRfrkhk8e7q832DHFMnp0ExFxw7ply6 Z7NVKqMm7982/KN73WC/t8TQGeY8YnYUBUhjawOiiwdkwGaf2El8QvFJAMqPl0ITnNmB JwCe7YazoNVDFUE0OfcHuV/WnM61jVeiapMzGytEy1xfYXNv/WBBzQfE4m24goFHOF6t 8HCg== 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=WqtcbxoSOGItOG0ThZqvROjEDQSWOsj30MHNiNTXR5A=; b=G2a3URpvPS3iWx0Gw1Rxyiusu0kOItlOp47gHtoNpaYg3zq7dNiBmLMbkHb+MJr2uQ WRKakXprdyv6kLVeLbtGq18WWXXBF8udytmrpkczlQXrazoIs/bOzCCL4j+816fmflwx 47nwyJjhvxefg4fSDHP/4RVgOS7RCV5rU7ddPixwXLDye3pKr7mY8LjRP+J3915jnqwM CG+kr3O29aKr65o5y99zr6T4/q9WiEda4v/wgvsL+ZhvtxtHzCSl53+SoDNUsiKg1+V7 2tIJniQVl1GCa3Mxt5M1bNtc0cNkyCAQIVF0GWSL7XWn0ZhHHEKRQlUWcC8XzRBtd0k7 gM5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kq1CMefU; 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 v5si30593218otn.155.2020.01.02.14.16.10; Thu, 02 Jan 2020 14:16:21 -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=kq1CMefU; 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 S1727257AbgABWPD (ORCPT + 99 others); Thu, 2 Jan 2020 17:15:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:55406 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727308AbgABWOz (ORCPT ); Thu, 2 Jan 2020 17:14:55 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 F030222314; Thu, 2 Jan 2020 22:14:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003294; bh=zYCLXWmHDfa1SipQIKdc3r1yJUfAljpCwyDls8BLOgA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kq1CMefU8pzHu8JyKWpwPSOJMzIevu9A+opdpYHDawO0lOAuZecwjNwGBBT7zaIQD 27G2rs5PEeFYFy2BmGbp5uca5vS8YIooZSBHkoVYOOfvSn4t3fDepPIav+BhB20QXd 9nubIq/GIkObn0TIFy85S940uqQq5VHShl3TpWEA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andy Shevchenko , Linus Walleij , Sasha Levin Subject: [PATCH 5.4 101/191] gpio: lynxpoint: Setup correct IRQ handlers Date: Thu, 2 Jan 2020 23:06:23 +0100 Message-Id: <20200102215840.765336057@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102215829.911231638@linuxfoundation.org> References: <20200102215829.911231638@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Andy Shevchenko [ Upstream commit e272f7ec070d212b9301d5a465bc8952f8dcf908 ] When commit 75e99bf5ed8f ("gpio: lynxpoint: set default handler to be handle_bad_irq()") switched default handler to be handle_bad_irq() the lp_irq_type() function remained untouched. It means that even request_irq() can't change the handler and we are not able to handle IRQs properly anymore. Fix it by setting correct handlers in the lp_irq_type() callback. Fixes: 75e99bf5ed8f ("gpio: lynxpoint: set default handler to be handle_bad_irq()") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20191118180251.31439-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/gpio/gpio-lynxpoint.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpio/gpio-lynxpoint.c b/drivers/gpio/gpio-lynxpoint.c index e9e47c0d5be7..490ce7bae25e 100644 --- a/drivers/gpio/gpio-lynxpoint.c +++ b/drivers/gpio/gpio-lynxpoint.c @@ -164,6 +164,12 @@ static int lp_irq_type(struct irq_data *d, unsigned type) value |= TRIG_SEL_BIT | INT_INV_BIT; outl(value, reg); + + if (type & IRQ_TYPE_EDGE_BOTH) + irq_set_handler_locked(d, handle_edge_irq); + else if (type & IRQ_TYPE_LEVEL_MASK) + irq_set_handler_locked(d, handle_level_irq); + spin_unlock_irqrestore(&lg->lock, flags); return 0; -- 2.20.1