From patchwork Thu Nov 19 08:46:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 7656101 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A9A289F2EC for ; Thu, 19 Nov 2015 09:50:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C9CF020460 for ; Thu, 19 Nov 2015 09:50:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 41C7020439 for ; Thu, 19 Nov 2015 09:50:31 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZzLof-0001Fy-KI; Thu, 19 Nov 2015 09:47:45 +0000 Received: from www.linuxtv.org ([130.149.80.248]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZzLob-000195-G6 for linux-arm-kernel@lists.infradead.org; Thu, 19 Nov 2015 09:47:42 +0000 Received: from mchehab by www.linuxtv.org with local (Exim 4.72) (envelope-from ) id 1ZzLoA-0001SK-OB; Thu, 19 Nov 2015 10:47:14 +0100 Message-Id: From: Mauro Carvalho Chehab Date: Thu, 19 Nov 2015 09:46:05 +0100 Subject: [git:media_tree/master] [media] media: st-rc: remove misuse of IRQF_NO_SUSPEND flag To: linuxtv-commits@linuxtv.org Mail-followup-to: linux-media@vger.kernel.org Forward-to: linux-media@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151119_014741_752052_00BE0F63 X-CRM114-Status: GOOD ( 13.92 ) X-Spam-Score: -4.8 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: linux-media@vger.kernel.org Cc: kernel@stlinux.com, Srinivas Kandagatla , Patrice Chotard , Sudeep Holla , linux-arm-kernel@lists.infradead.org, Maxime Coquelin MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/cgit.cgi/media_tree.git tree: Subject: [media] media: st-rc: remove misuse of IRQF_NO_SUSPEND flag Author: Sudeep Holla Date: Mon Sep 21 12:47:10 2015 -0300 The device is set as wakeup capable using proper wakeup API but the driver misuses IRQF_NO_SUSPEND to set the interrupt as wakeup source which is incorrect. This patch removes the use of IRQF_NO_SUSPEND flags replacing it with enable_irq_wake instead. Cc: Srinivas Kandagatla Cc: Maxime Coquelin Cc: Patrice Chotard Cc: linux-arm-kernel@lists.infradead.org Cc: kernel@stlinux.com Signed-off-by: Sudeep Holla Signed-off-by: Mauro Carvalho Chehab drivers/media/rc/st_rc.c | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) --- http://git.linuxtv.org/cgit.cgi/media_tree.git/commit/?id=a2d1e1ed18dbd67c7d0e20e7c55336d075273b18 diff --git a/drivers/media/rc/st_rc.c b/drivers/media/rc/st_rc.c index 37d0401..1fa0c9d 100644 --- a/drivers/media/rc/st_rc.c +++ b/drivers/media/rc/st_rc.c @@ -16,6 +16,7 @@ #include #include #include +#include struct st_rc_device { struct device *dev; @@ -190,6 +191,9 @@ static void st_rc_hardware_init(struct st_rc_device *dev) static int st_rc_remove(struct platform_device *pdev) { struct st_rc_device *rc_dev = platform_get_drvdata(pdev); + + dev_pm_clear_wake_irq(&pdev->dev); + device_init_wakeup(&pdev->dev, false); clk_disable_unprepare(rc_dev->sys_clock); rc_unregister_device(rc_dev->rdev); return 0; @@ -298,22 +302,22 @@ static int st_rc_probe(struct platform_device *pdev) rdev->map_name = RC_MAP_LIRC; rdev->input_name = "ST Remote Control Receiver"; - /* enable wake via this device */ - device_set_wakeup_capable(dev, true); - device_set_wakeup_enable(dev, true); - ret = rc_register_device(rdev); if (ret < 0) goto clkerr; rc_dev->rdev = rdev; if (devm_request_irq(dev, rc_dev->irq, st_rc_rx_interrupt, - IRQF_NO_SUSPEND, IR_ST_NAME, rc_dev) < 0) { + 0, IR_ST_NAME, rc_dev) < 0) { dev_err(dev, "IRQ %d register failed\n", rc_dev->irq); ret = -EINVAL; goto rcerr; } + /* enable wake via this device */ + device_init_wakeup(dev, true); + dev_pm_set_wake_irq(dev, rc_dev->irq); + /** * for LIRC_MODE_MODE2 or LIRC_MODE_PULSE or LIRC_MODE_RAW * lircd expects a long space first before a signal train to sync.