From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from lists.s-osg.org ([54.187.51.154]:58443 "EHLO lists.s-osg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754744AbcA1RcE (ORCPT ); Thu, 28 Jan 2016 12:32:04 -0500 Date: Thu, 28 Jan 2016 15:31:47 -0200 From: Mauro Carvalho Chehab To: Shuah Khan Cc: One Thousand Gnomes , tiwai@suse.com, clemens@ladisch.de, hans.verkuil@cisco.com, laurent.pinchart@ideasonboard.com, sakari.ailus@linux.intel.com, javier@osg.samsung.com, pawel@osciak.com, m.szyprowski@samsung.com, kyungmin.park@samsung.com, perex@perex.cz, arnd@arndb.de, dan.carpenter@oracle.com, tvboxspy@gmail.com, crope@iki.fi, ruchandani.tina@gmail.com, corbet@lwn.net, chehabrafael@gmail.com, k.kozlowski@samsung.com, stefanr@s5r6.in-berlin.de, inki.dae@samsung.com, jh1009.sung@samsung.com, elfring@users.sourceforge.net, prabhakar.csengg@gmail.com, sw0312.kim@samsung.com, p.zabel@pengutronix.de, ricardo.ribalda@gmail.com, labbott@fedoraproject.org, pierre-louis.bossart@linux.intel.com, ricard.wanderlof@axis.com, julian@jusst.de, takamichiho@gmail.com, dominic.sacre@gmx.de, misterpib@gmail.com, daniel@zonque.org, gtmkramer@xs4all.nl, normalperson@yhbt.net, joe@oampo.co.uk, linuxbugs@vittgam.net, johan@oljud.se, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-api@vger.kernel.org, alsa-devel@alsa-project.org Subject: Re: [PATCH 15/31] media: dvb-frontend invoke enable/disable_source handlers Message-ID: <20160128153147.199ec4f6@recife.lan> In-Reply-To: <56AA48FA.7070203@osg.samsung.com> References: <1591b6cf2025fa95a13e3b7dde52aa0e0bde0bb4.1452105878.git.shuahkh@osg.samsung.com> <20160128135304.3daa79f1@recife.lan> <20160128160711.029f3faf@lxorguk.ukuu.org.uk> <56AA48FA.7070203@osg.samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-media-owner@vger.kernel.org List-ID: Em Thu, 28 Jan 2016 09:59:38 -0700 Shuah Khan escreveu: > On 01/28/2016 09:07 AM, One Thousand Gnomes wrote: > > On Thu, 28 Jan 2016 13:53:04 -0200 > > Mauro Carvalho Chehab wrote: > > > >> Em Wed, 6 Jan 2016 13:27:04 -0700 > >> Shuah Khan escreveu: > >> > >>> Checking for tuner availability from frontend thread start > >>> disrupts video stream. Change to check for tuner and start > >>> pipeline from frontend open instead and stop pipeline from > >>> frontend release. > >> > >> That's wrong, as DVB can be opened on read-only mode, where > >> it won't be changing anything. > > Correct. Please check the code. Tuner availability check is > done when the device is opened in Write mode in the following > conditional. > > if ((file->f_flags & O_ACCMODE) != O_RDONLY) { OK. Thanks! Mauro , I don't think POSIX allows to return an error like EBUSY > >> on open: > >> http://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html > > > > It doesn't document all the errors you may return. Quite a lot of > > kernel drivers return EBUSY when they are "single open" things. > > > > POSIX documents certain cases that *must* error and what the error code > > is. It documents certain possible failures and what their error code is. > > Beyond that it's up to you. > > > > Returning EBUSY clearly indicates the reason why the device > can't be opened in this case. > > thanks, > -- Shuah > > Thanks! Mauro