From patchwork Thu Jan 11 07:11:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: venkat.prashanth2498@gmail.com X-Patchwork-Id: 10157393 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 52F5C602D8 for ; Thu, 11 Jan 2018 07:11:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 40949286E2 for ; Thu, 11 Jan 2018 07:11:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 30FD1286E4; Thu, 11 Jan 2018 07:11:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B84D7286E2 for ; Thu, 11 Jan 2018 07:11:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932159AbeAKHLZ (ORCPT ); Thu, 11 Jan 2018 02:11:25 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:41870 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932102AbeAKHLY (ORCPT ); Thu, 11 Jan 2018 02:11:24 -0500 Received: by mail-pf0-f195.google.com with SMTP id j3so951321pfh.8 for ; Wed, 10 Jan 2018 23:11:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=CNN8xzIPYqKqOhpwu/xfiC6/kJhU6QhNAuP8OjTB0fw=; b=uHrgdPglG2tygFU76d8Vi6ApAqDC1UowVmi44B+dxIf2S8+deMSlxb0oeVF6a0GtLv gDhot7KhcsLI6dCMp17GpH8XUvu5CpFLKbv2Mx/WqFrjK2It3E77EDDGNf2E1diI67Dr WOUpGJbI17mh/tgBKwWRePIRgS42PUbMowPe/NutpI9EHPT79FkdY8pRaqE0ZupnDguJ MGTbOHcs1ySdye6mAXnxRkQX0boYswofF1myariirsvT8HCc9EE/Drl4mrZDTm7Fxm5x XNso1krX/yAu6wWdE3MVXKqK1VfFj9tG1Sk0qDRVCO44jtPrLM6Fn7qrTxrkql/3IDPG PdDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=CNN8xzIPYqKqOhpwu/xfiC6/kJhU6QhNAuP8OjTB0fw=; b=A0qz+vtVf3BVztcJHr/yNGdcukfe+pN3vD6fDc6Vb79MYQC/OhMSmok0XwOiw4OUeP Xvhv8fHmLttnpFDj7qdSurL7ichOWJsNHB2qjFq3hTHt/LVQCNzMOy34o9r5jUp1GCOF MDQ4E70HfmGmG3goJ28srJrLy5lwW56wtdJdAr5mmw6J6jKAQwIwtuC8VDAJgHwJgJPt CWBkQW92x+di6osTwim1aF3OtbHr95IduukAzbEhDmimgs0T0HBx8TpwpPZZjccZF5Nx wCfr/PE1/ALav5HUG9847TlQ7fzguTmuq+hiERmPk7KvWShzRQw7DdvZPpxQkv7HJjEI prHQ== X-Gm-Message-State: AKGB3mL7+OfCqFSHBdtzAv8vJq/tAPATxymMDky3q3p4Lx5rn+UzAywe qfyUQrNceTVkmLIXVlJ33Aw= X-Google-Smtp-Source: ACJfBosLydiw72YN4UxRyZZS9NmW6PADTYAkbvHng1uPcqobjJA8lPw+td8GigcQfkD7eySV9jPrMA== X-Received: by 10.99.114.28 with SMTP id n28mr8428309pgc.86.1515654684181; Wed, 10 Jan 2018 23:11:24 -0800 (PST) Received: from localhost.localdomain ([117.242.83.134]) by smtp.gmail.com with ESMTPSA id 126sm9508893pfe.134.2018.01.10.23.11.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 Jan 2018 23:11:23 -0800 (PST) From: venkat.prashanth2498@gmail.com To: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org Cc: knaack.h@gmx.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, Venkat Prashanth B U Subject: [PATCH] adc:cpcap-adc: Fix IRQ flags for using threaded handler Date: Thu, 11 Jan 2018 12:41:00 +0530 Message-Id: <1515654660-9054-1-git-send-email-venkat.prashanth2498@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Venkat Prashanth B U Mark the request with ONESHOT using IRQF_ONESHOT. Semantic patch information: threaded IRQs without a primary handler need to be requested with IRQF_ONESHOT, otherwise the request will fail. So pass the IRQF_ONESHOT flag in this case. Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci Signed-off-by: Venkat Prashanth B U --- drivers/iio/adc/cpcap-adc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/iio/adc/cpcap-adc.c b/drivers/iio/adc/cpcap-adc.c index 9ad6042..b73fa46 100644 --- a/drivers/iio/adc/cpcap-adc.c +++ b/drivers/iio/adc/cpcap-adc.c @@ -1015,9 +1015,9 @@ static int cpcap_adc_probe(struct platform_device *pdev) return -ENODEV; error = devm_request_threaded_irq(&pdev->dev, ddata->irq, NULL, - cpcap_adc_irq_thread, - IRQF_TRIGGER_NONE, - "cpcap-adc", indio_dev); + cpcap_adc_irq_thread, + IRQF_TRIGGER_NONE | IRQF_ONESHOT, + "cpcap-adc", indio_dev); if (error) { dev_err(&pdev->dev, "could not get irq: %i\n", error);