From patchwork Tue Jan 18 09:13:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver Endriss X-Patchwork-Id: 5617 Return-path: Envelope-to: mchehab@pedra Delivery-date: Tue, 18 Jan 2011 10:02:01 -0200 Received: from mchehab by pedra with local (Exim 4.72) (envelope-from ) id 1PfAG8-0001SN-Uw for mchehab@pedra; Tue, 18 Jan 2011 10:02:01 -0200 Received: from casper.infradead.org [85.118.1.10] by pedra with IMAP (fetchmail-6.3.17) for (single-drop); Tue, 18 Jan 2011 10:02:00 -0200 (BRST) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1Pf7e9-0005kl-MS; Tue, 18 Jan 2011 09:14:38 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752997Ab1ARJOf (ORCPT + 1 other); Tue, 18 Jan 2011 04:14:35 -0500 Received: from mailout-de.gmx.net ([213.165.64.23]:44844 "HELO mailout-de.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752740Ab1ARJOd (ORCPT ); Tue, 18 Jan 2011 04:14:33 -0500 Received: (qmail invoked by alias); 18 Jan 2011 09:14:31 -0000 Received: from p5090678B.dip.t-dialin.net (HELO charon.escape-edv.de) [80.144.103.139] by mail.gmx.net (mp009) with SMTP; 18 Jan 2011 10:14:31 +0100 X-Authenticated: #476490 X-Provags-ID: V01U2FsdGVkX19pqaxSgidp2dCJHO9TK9K0m1rMHpP6MvqYsMqpEJ 6vw7IPu5yJtb3d Received: from orion.escape-edv.de (192.168.1.10) by charon.escape-edv.de (192.168.1.9) with esmtp ; Tue, 18 Jan 2011 10:17:35 +0100 From: Oliver Endriss Reply-To: linux-media@vger.kernel.org Organization: ESCAPE GmbH EDV-Loesungen To: Mauro Carvalho Chehab Subject: Re: [PATCH 07/16] ngene: CXD2099AR Common Interface driver Date: Tue, 18 Jan 2011 10:13:48 +0100 User-Agent: KMail/1.9.6 Cc: linux-media@vger.kernel.org, Andreas Oberritter , Ralph Metzler References: <1294652184-12843-1-git-send-email-o.endriss@gmx.de> <201101101820.07907@orion.escape-edv.de> <4D346ED3.2030703@redhat.com> In-Reply-To: <4D346ED3.2030703@redhat.com> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201101181013.49222@orion.escape-edv.de> X-Y-GMX-Trusted: 0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sender: On Monday 17 January 2011 17:31:15 Mauro Carvalho Chehab wrote: > Em 10-01-2011 15:20, Oliver Endriss escreveu: > > On Monday 10 January 2011 15:05:34 Andreas Oberritter wrote: > >> On 01/10/2011 10:36 AM, Oliver Endriss wrote: > >>> From: Ralph Metzler > >>> > >>> Driver for the Common Interface Controller CXD2099AR. > >>> Supports the CI of the cineS2 DVB-S2. > >>> > >>> For now, data is passed through '/dev/dvb/adapterX/sec0': > >>> - Encrypted data must be written to 'sec0'. > >>> - Decrypted data can be read from 'sec0'. > >>> - Setup the CAM using device 'ca0'. > >> > >> Nack. In DVB API terms, "sec" stands for satellite equipment control, > >> and if I remember correctly, sec0 already existed in the first versions > >> of the API and that's why its leftovers can be abused by this driver. > >> > >> The interfaces for writing data are dvr0 and demux0. If they don't fit > >> for decryption of recorded data, then they should be extended. > >> > >> For decryption of live data, no new user interface needs to be created. > > > > There was an attempt to find a solution for the problem in thread > > http://www.mail-archive.com/linux-media@vger.kernel.org/msg22196.html > > > > As that discussion did not come to a final solution, and the driver is > > still experimental, I left the original patch 'as is'. > > Drivers that don't use the proper API should be moved to staging. Just making > them as experimental is not good enough. As this is the only issue with > this patch series, I'll be applying them and moving cxd2099 driver to staging > while we don't have a proper fix for it. Ok. > +struct dvb_ca_en50221 *cxd2099_attach(u8 adr, void *priv, struct i2c_adapter *i2c) > +{ > + printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); > + return NULL; > +} > +#endif If staging drivers are disabled, compilation will fail with "multiple definition of `cxd2099_attach'". The helper function must be declared as 'static inline'. Please apply this fix: diff --git a/drivers/staging/cxd2099/cxd2099.h b/drivers/staging/cxd2099/cxd2099.h index a313dc2..bed54ff 100644 --- a/drivers/staging/cxd2099/cxd2099.h +++ b/drivers/staging/cxd2099/cxd2099.h @@ -31,7 +31,7 @@ (defined(CONFIG_DVB_CXD2099_MODULE) && defined(MODULE)) struct dvb_ca_en50221 *cxd2099_attach(u8 adr, void *priv, struct i2c_adapter *i2c); #else -struct dvb_ca_en50221 *cxd2099_attach(u8 adr, void *priv, struct i2c_adapter *i2c) +static inline struct dvb_ca_en50221 *cxd2099_attach(u8 adr, void *priv, struct i2c_adapter *i2c) { printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); return NULL;