From patchwork Mon Sep 21 15:47:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 53980 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by patches.linaro.org (Postfix) with ESMTPS id E1B1122B04 for ; Mon, 21 Sep 2015 15:50:01 +0000 (UTC) Received: by lanb10 with SMTP id b10sf43574530lan.3 for ; Mon, 21 Sep 2015 08:50:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=af+hr03YTIA9JStrvXctR25dagOftdRsPoqq29ofjH4=; b=LQmXARyzKn/6nNr3HIXxRfpTuBtuVEKuTJrLUV/RsXfPcbEsU8soEsWy5MTywZz855 rQ2L4yIKVzBoVqzUz7pOzrVlXylL3DkvYFUuZ4j/l50JKbW6H4kFKGEZY1bqElSFUX8x xK11r+N4DeeF6bFSMGzrUudz/lzZyCmoHJqFTWLb3N8FfOKyPyFQfM8GE+2vySxn/gyd +YFx6nGNe8arRfoA4ut4W4ieg4GCxCFd7Uh9GDlZsIpCaBEHOIVH2lCyiSI0mj6As9TO HHzbYzUxw8Oa+6SCjpYilKkZVV/1oKqlSHauMCLrAO0JUXsIp+xHuv9gTEFe+6tzPvtI 4I8g== X-Gm-Message-State: ALoCoQmZPYAYtjEqlQ1gkk+LXVfaoKnnSmYzYpt8gkOW7IWEiwiEyVeBllNluxVcRYixeRTmZyJr X-Received: by 10.112.145.3 with SMTP id sq3mr3412117lbb.7.1442850600896; Mon, 21 Sep 2015 08:50:00 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.179.75 with SMTP id de11ls441804lac.26.gmail; Mon, 21 Sep 2015 08:50:00 -0700 (PDT) X-Received: by 10.112.166.1 with SMTP id zc1mr4541262lbb.28.1442850600731; Mon, 21 Sep 2015 08:50:00 -0700 (PDT) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id 7si16541501lan.162.2015.09.21.08.50.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Sep 2015 08:50:00 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by lbbmp1 with SMTP id mp1so53499694lbb.1 for ; Mon, 21 Sep 2015 08:50:00 -0700 (PDT) X-Received: by 10.25.77.133 with SMTP id a127mr1533666lfb.19.1442850600598; Mon, 21 Sep 2015 08:50:00 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1784888lbq; Mon, 21 Sep 2015 08:49:59 -0700 (PDT) X-Received: by 10.68.111.165 with SMTP id ij5mr25174484pbb.59.1442850599528; Mon, 21 Sep 2015 08:49:59 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id mz8si38714364pbc.89.2015.09.21.08.49.59; Mon, 21 Sep 2015 08:49:59 -0700 (PDT) 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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933005AbbIUPt5 (ORCPT + 30 others); Mon, 21 Sep 2015 11:49:57 -0400 Received: from foss.arm.com ([217.140.101.70]:54076 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932857AbbIUPsa (ORCPT ); Mon, 21 Sep 2015 11:48:30 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 74E2F572; Mon, 21 Sep 2015 08:48:34 -0700 (PDT) Received: from e103737-lin.cambridge.arm.com (e103737-lin.cambridge.arm.com [10.1.207.150]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 188013F2E5; Mon, 21 Sep 2015 08:48:27 -0700 (PDT) From: Sudeep Holla To: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Sudeep Holla , Thomas Gleixner , "Rafael J. Wysocki" , Srinivas Kandagatla , Maxime Coquelin , Patrice Chotard , Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, kernel@stlinux.com, linux-media@vger.kernel.org Subject: [PATCH 14/17] media: st-rc: remove misuse of IRQF_NO_SUSPEND flag Date: Mon, 21 Sep 2015 16:47:10 +0100 Message-Id: <1442850433-5903-15-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442850433-5903-1-git-send-email-sudeep.holla@arm.com> References: <1442850433-5903-1-git-send-email-sudeep.holla@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sudeep.holla@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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: Mauro Carvalho Chehab Cc: linux-arm-kernel@lists.infradead.org Cc: kernel@stlinux.com Cc: linux-media@vger.kernel.org Signed-off-by: Sudeep Holla --- drivers/media/rc/st_rc.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/media/rc/st_rc.c b/drivers/media/rc/st_rc.c index 37d040158dff..1fa0c9d1c508 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.