From patchwork Thu Sep 1 17:16: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: 9309745 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 28C4F60760 for ; Thu, 1 Sep 2016 21:30:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E379929406 for ; Thu, 1 Sep 2016 21:30:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D8497294F3; Thu, 1 Sep 2016 21:30:10 +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 23F5C29474 for ; Thu, 1 Sep 2016 21:30:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932228AbcIAVaG (ORCPT ); Thu, 1 Sep 2016 17:30:06 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:44395 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755667AbcIAV1V (ORCPT ); Thu, 1 Sep 2016 17:27:21 -0400 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OCU01AG15BQ7G90@mailout4.samsung.com>; Fri, 02 Sep 2016 02:16:38 +0900 (KST) Received: from epcpsbgm2new.samsung.com ( [172.20.52.112]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id EB.0F.27902.67268C75; Fri, 2 Sep 2016 02:16:38 +0900 (KST) X-AuditID: cbfee68e-f79cb6d000006cfe-ea-57c86276b85c Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id EE.F4.07740.67268C75; Thu, 1 Sep 2016 10:16:38 -0700 (MST) Received: from samsunx.samsung ([10.113.63.54]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OCU00L0B5BMT280@mmp1.samsung.com>; Fri, 02 Sep 2016 02:16:37 +0900 (KST) From: Andi Shyti To: Mauro Carvalho Chehab , Sean Young , Rob Herring , Mark Rutland Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Andi Shyti , Andi Shyti Subject: [PATCH v2 5/7] [media] ir-lirc-codec: don't wait any transmitting time for tx only devices Date: Fri, 02 Sep 2016 02:16:27 +0900 Message-id: <20160901171629.15422-6-andi.shyti@samsung.com> X-Mailer: git-send-email 2.9.3 In-reply-to: <20160901171629.15422-1-andi.shyti@samsung.com> References: <20160901171629.15422-1-andi.shyti@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrHLMWRmVeSWpSXmKPExsWyRsSkQLcs6US4wcKrAhbbjzxjtVj84zmT xfwj51gtLu+aw2bRs2Erq8XS6xeZLFY/q7Bo3XuE3WLh0+8sDpwea+atYfS4vuQTs8emVZ1s HkveWHts6b/L7tG3ZRWjx+dNcgHsUVw2Kak5mWWpRfp2CVwZjdcDC96xVjQeucjWwPiMpYuR k0NCwERi0ZsJjBC2mMSFe+vZuhi5OIQEVjBK7F34Eq7o+YILLBCJpYwSbbdWQDkfGSXWXn/I BlLFJqAp0XT7B1i7iMAsRonXU38wgySYBRYySmz4rAxiCwukSrzpnAYWZxFQlbhxeAkriM0r YC1xfv9jdoh1chKXtn0Bq+EUsJGYfPoyWI0QUM2B9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sam5gZWRqZG1oYGZsr ifM+/r8uTEggPbEkNTs1tSC1CKaPiYNTqoFRcorFel/tlQGHypatOXujXMhAe4eBd+f/tonV cQFNr8+WzlvxKzS3+W2Uo8G1jT+KlF6U7D46p8SI+aBndOt2R/+82QxPdnj9neXad7WCO77+ 5slzT34JONuckc+dG9V4MknHMeNy1qzsjHlP10+8YOWntnjdbQv/A26Tdv+eHnNyAs+vnfaG SizFGYmGWsxFxYkAQe3c7s4CAAA= 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 Transmitters do not need to wait until the data has been sent (and of course received). Return before waiting. Signed-off-by: Andi Shyti --- drivers/media/rc/ir-lirc-codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/rc/ir-lirc-codec.c b/drivers/media/rc/ir-lirc-codec.c index c327730..d8953fb 100644 --- a/drivers/media/rc/ir-lirc-codec.c +++ b/drivers/media/rc/ir-lirc-codec.c @@ -153,7 +153,7 @@ static ssize_t ir_lirc_transmit_ir(struct file *file, const char __user *buf, } ret = dev->tx_ir(dev, txbuf, count); - if (ret < 0) + if (ret < 0 || dev->driver_type == RC_DRIVER_IR_RAW_TX) goto out; for (duration = i = 0; i < ret; i++)