From patchwork Wed Jul 6 09:01:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Shyti X-Patchwork-Id: 9215935 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 5F75E60467 for ; Wed, 6 Jul 2016 09:47:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50F4A287D6 for ; Wed, 6 Jul 2016 09:47:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 45B1A287DA; Wed, 6 Jul 2016 09:47:06 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 E0F44287D6 for ; Wed, 6 Jul 2016 09:47:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753697AbcGFJqA (ORCPT ); Wed, 6 Jul 2016 05:46:00 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:37356 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753076AbcGFJoB (ORCPT ); Wed, 6 Jul 2016 05:44:01 -0400 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O9W00XCM0D6Z640@mailout1.samsung.com>; Wed, 06 Jul 2016 18:43:54 +0900 (KST) Received: from epcpsbgm1new.samsung.com ( [172.20.52.113]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 01.79.05161.AD2DC775; Wed, 6 Jul 2016 18:43:54 +0900 (KST) X-AuditID: cbfee68f-f79476d000001429-45-577cd2dac08c Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id A8.12.02101.AD2DC775; Wed, 6 Jul 2016 18:43:54 +0900 (KST) Received: from samsunx.samsung ([10.113.63.54]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O9W003BE0D2J600@mmp2.samsung.com>; Wed, 06 Jul 2016 18:43:54 +0900 (KST) From: Andi Shyti To: Mauro Carvalho Chehab Cc: Joe Perches , Sean Young , Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Andi Shyti , Andi Shyti Subject: [PATCH v3 15/15] [media] lirc_dev: use LIRC_CAN_REC() define to check if the device can receive Date: Wed, 06 Jul 2016 18:01:27 +0900 Message-id: <1467795687-10737-16-git-send-email-andi.shyti@samsung.com> X-Mailer: git-send-email 2.8.1 In-reply-to: <1467795687-10737-1-git-send-email-andi.shyti@samsung.com> References: <1467795687-10737-1-git-send-email-andi.shyti@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrCLMWRmVeSWpSXmKPExsWyRsSkUPfWpZpwg1tndS22H3nGarH4x3Mm i1OTnzFZzL7/mMXi8q45bBY9G7ayWqx+VmGx8Ol3FgcOj+tLPjF7LHlj7bGl/y67x5dV15g9 +rasYvT4vEnO49TXz+wB7FFcNimpOZllqUX6dglcGW/vCBZs5aho2yjdwPiKrYuRk0NCwESi 890JKFtM4sK99UA2F4eQwApGic7tC9i7GDnAiv68VYKIz2KU2HnqJFTRR0aJLat+MIF0swlo SjTd/sEG0iAiYCxx7oc6SA2zwFNGiX1T54LVCAtkSXzce4EFxGYRUJW4ffcQI0g9r4C7xOop ehBHyElcnv4AbAwnUPjqciWQsJCAm8T+bTfZQUZKCKx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NLUgtgulj4uCUamDUEnheZnP6DdNtLuugtRdz39rteT7p27rJB3dElpwyCT0y e7aGjEWcwJS2+YeyN3bsf9AWGnKoMyO3bbrthB9+EW7mvMfvpE3cERfMySs5yXYG98RlWkFX im5Zr7vqYTBtock91k0L+BsbP3hvWjpBpW2j5+4NC7kF2Nbznq1+/XOz48Lbae3vlViKMxIN tZiLihMB1qzsRMQCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The LIRC_CAN_REC() returns a boolean "flag & LIRC_CAN_REC_MASK" to check whether the device can receive data. Signed-off-by: Andi Shyti --- drivers/media/rc/lirc_dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index 8cf5e6b..809a867 100644 --- a/drivers/media/rc/lirc_dev.c +++ b/drivers/media/rc/lirc_dev.c @@ -586,7 +586,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) result = put_user(ir->d.features, (__u32 __user *)arg); break; case LIRC_GET_REC_MODE: - if (!(ir->d.features & LIRC_CAN_REC_MASK)) { + if (LIRC_CAN_REC(ir->d.features)) { result = -ENOTTY; break; } @@ -596,7 +596,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) (__u32 __user *)arg); break; case LIRC_SET_REC_MODE: - if (!(ir->d.features & LIRC_CAN_REC_MASK)) { + if (LIRC_CAN_REC(ir->d.features)) { result = -ENOTTY; break; }