public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Stezenbach <js@linuxtv.org>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, Patrick Boettcher <pb@linuxtv.org>
Subject: [DVB patch 28/54] usb: core: change dvb_usb_device_init() API
Date: Mon, 05 Sep 2005 01:23:27 +0200	[thread overview]
Message-ID: <20050904232326.850589000@abc> (raw)
In-Reply-To: 20050904232259.777473000@abc

[-- Attachment #1: dvb-usb-device_init-return-device.patch --]
[-- Type: text/plain, Size: 9226 bytes --]

From: Patrick Boettcher <pb@linuxtv.org>

Change the init call to optionally return the new dvb_usb_device directly.

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Johannes Stezenbach <js@linuxtv.org>

 drivers/media/dvb/dvb-usb/a800.c         |    2 +-
 drivers/media/dvb/dvb-usb/cxusb.c        |    2 +-
 drivers/media/dvb/dvb-usb/dibusb-mb.c    |    6 +++---
 drivers/media/dvb/dvb-usb/dibusb-mc.c    |    2 +-
 drivers/media/dvb/dvb-usb/digitv.c       |    2 +-
 drivers/media/dvb/dvb-usb/dtt200u.c      |    4 ++--
 drivers/media/dvb/dvb-usb/dvb-usb-ids.h  |    3 +++
 drivers/media/dvb/dvb-usb/dvb-usb-init.c |    7 ++++++-
 drivers/media/dvb/dvb-usb/dvb-usb.h      |    4 ++--
 drivers/media/dvb/dvb-usb/nova-t-usb2.c  |    2 +-
 drivers/media/dvb/dvb-usb/umt-010.c      |    2 +-
 drivers/media/dvb/dvb-usb/vp702x.c       |    2 +-
 drivers/media/dvb/dvb-usb/vp7045.c       |    2 +-
 13 files changed, 24 insertions(+), 16 deletions(-)

--- linux-2.6.13-git4.orig/drivers/media/dvb/dvb-usb/a800.c	2005-09-04 23:30:21.000000000 +0200
+++ linux-2.6.13-git4/drivers/media/dvb/dvb-usb/a800.c	2005-09-04 23:32:19.000000000 +0200
@@ -90,7 +90,7 @@ static struct dvb_usb_properties a800_pr
 static int a800_probe(struct usb_interface *intf,
 		const struct usb_device_id *id)
 {
-	return dvb_usb_device_init(intf,&a800_properties,THIS_MODULE);
+	return dvb_usb_device_init(intf,&a800_properties,THIS_MODULE,NULL);
 }
 
 /* do not change the order of the ID table */
--- linux-2.6.13-git4.orig/drivers/media/dvb/dvb-usb/dibusb-mb.c	2005-09-04 23:32:19.000000000 +0200
+++ linux-2.6.13-git4/drivers/media/dvb/dvb-usb/dibusb-mb.c	2005-09-04 23:32:19.000000000 +0200
@@ -86,9 +86,9 @@ static struct dvb_usb_properties dibusb2
 static int dibusb_probe(struct usb_interface *intf,
 		const struct usb_device_id *id)
 {
-	if (dvb_usb_device_init(intf,&dibusb1_1_properties,THIS_MODULE) == 0 ||
-		dvb_usb_device_init(intf,&dibusb1_1_an2235_properties,THIS_MODULE) == 0 ||
-		dvb_usb_device_init(intf,&dibusb2_0b_properties,THIS_MODULE) == 0)
+	if (dvb_usb_device_init(intf,&dibusb1_1_properties,THIS_MODULE,NULL) == 0 ||
+		dvb_usb_device_init(intf,&dibusb1_1_an2235_properties,THIS_MODULE,NULL) == 0 ||
+		dvb_usb_device_init(intf,&dibusb2_0b_properties,THIS_MODULE,NULL) == 0)
 		return 0;
 
 	return -EINVAL;
--- linux-2.6.13-git4.orig/drivers/media/dvb/dvb-usb/dibusb-mc.c	2005-09-04 23:30:21.000000000 +0200
+++ linux-2.6.13-git4/drivers/media/dvb/dvb-usb/dibusb-mc.c	2005-09-04 23:32:19.000000000 +0200
@@ -20,7 +20,7 @@ static struct dvb_usb_properties dibusb_
 static int dibusb_mc_probe(struct usb_interface *intf,
 		const struct usb_device_id *id)
 {
-	return dvb_usb_device_init(intf,&dibusb_mc_properties,THIS_MODULE);
+	return dvb_usb_device_init(intf,&dibusb_mc_properties,THIS_MODULE,NULL);
 }
 
 /* do not change the order of the ID table */
--- linux-2.6.13-git4.orig/drivers/media/dvb/dvb-usb/dtt200u.c	2005-09-04 23:32:19.000000000 +0200
+++ linux-2.6.13-git4/drivers/media/dvb/dvb-usb/dtt200u.c	2005-09-04 23:32:19.000000000 +0200
@@ -98,8 +98,8 @@ static struct dvb_usb_properties wt220u_
 static int dtt200u_usb_probe(struct usb_interface *intf,
 		const struct usb_device_id *id)
 {
-	if (dvb_usb_device_init(intf,&dtt200u_properties,THIS_MODULE) == 0 ||
-		dvb_usb_device_init(intf,&wt220u_properties,THIS_MODULE) == 0)
+	if (dvb_usb_device_init(intf,&dtt200u_properties,THIS_MODULE,NULL) == 0 ||
+		dvb_usb_device_init(intf,&wt220u_properties,THIS_MODULE,NULL) == 0)
 		return 0;
 
 	return -ENODEV;
--- linux-2.6.13-git4.orig/drivers/media/dvb/dvb-usb/dvb-usb-ids.h	2005-09-04 23:32:19.000000000 +0200
+++ linux-2.6.13-git4/drivers/media/dvb/dvb-usb/dvb-usb-ids.h	2005-09-04 23:32:19.000000000 +0200
@@ -27,6 +27,7 @@
 #define USB_VID_KWORLD						0xeb2a
 #define USB_VID_KYE							0x0458
 #define USB_VID_MEDION						0x1660
+#define USB_VID_PINNACLE					0x2304
 #define USB_VID_VISIONPLUS					0x13d3
 #define USB_VID_TWINHAN						0x1822
 #define USB_VID_ULTIMA_ELECTRONIC			0x05d8
@@ -88,5 +89,7 @@
 #define USB_PID_MEDION_MD95700				0x0932
 #define USB_PID_KYE_DVB_T_COLD				0x701e
 #define USB_PID_KYE_DVB_T_WARM				0x701f
+#define USB_PID_PCTV_200E					0x020e
+#define USB_PID_PCTV_400E					0x020f
 
 #endif
--- linux-2.6.13-git4.orig/drivers/media/dvb/dvb-usb/dvb-usb-init.c	2005-09-04 23:32:19.000000000 +0200
+++ linux-2.6.13-git4/drivers/media/dvb/dvb-usb/dvb-usb-init.c	2005-09-04 23:32:19.000000000 +0200
@@ -128,7 +128,9 @@ static struct dvb_usb_device_description
 /*
  * USB
  */
-int dvb_usb_device_init(struct usb_interface *intf, struct dvb_usb_properties *props, struct module *owner)
+
+int dvb_usb_device_init(struct usb_interface *intf, struct dvb_usb_properties
+		*props, struct module *owner,struct dvb_usb_device **du)
 {
 	struct usb_device *udev = interface_to_usbdev(intf);
 	struct dvb_usb_device *d = NULL;
@@ -170,6 +172,9 @@ int dvb_usb_device_init(struct usb_inter
 
 		usb_set_intfdata(intf, d);
 
+		if (du != NULL)
+			*du = d;
+
 		ret = dvb_usb_init(d);
 	}
 
--- linux-2.6.13-git4.orig/drivers/media/dvb/dvb-usb/dvb-usb.h	2005-09-04 23:30:21.000000000 +0200
+++ linux-2.6.13-git4/drivers/media/dvb/dvb-usb/dvb-usb.h	2005-09-04 23:32:19.000000000 +0200
@@ -127,7 +127,7 @@ struct dvb_usb_device;
  *  helper functions.
  *
  * @urb: describes the kind of USB transfer used for MPEG2-TS-streaming.
- *  Currently only BULK is implemented
+ *  (BULK or ISOC)
  *
  * @num_device_descs: number of struct dvb_usb_device_description in @devices
  * @devices: array of struct dvb_usb_device_description compatibles with these
@@ -310,7 +310,7 @@ struct dvb_usb_device {
 	void *priv;
 };
 
-extern int dvb_usb_device_init(struct usb_interface *, struct dvb_usb_properties *, struct module *);
+extern int dvb_usb_device_init(struct usb_interface *, struct dvb_usb_properties *, struct module *, struct dvb_usb_device **);
 extern void dvb_usb_device_exit(struct usb_interface *);
 
 /* the generic read/write method for device control */
--- linux-2.6.13-git4.orig/drivers/media/dvb/dvb-usb/nova-t-usb2.c	2005-09-04 23:30:21.000000000 +0200
+++ linux-2.6.13-git4/drivers/media/dvb/dvb-usb/nova-t-usb2.c	2005-09-04 23:32:19.000000000 +0200
@@ -144,7 +144,7 @@ static struct dvb_usb_properties nova_t_
 static int nova_t_probe(struct usb_interface *intf,
 		const struct usb_device_id *id)
 {
-	return dvb_usb_device_init(intf,&nova_t_properties,THIS_MODULE);
+	return dvb_usb_device_init(intf,&nova_t_properties,THIS_MODULE,NULL);
 }
 
 /* do not change the order of the ID table */
--- linux-2.6.13-git4.orig/drivers/media/dvb/dvb-usb/umt-010.c	2005-09-04 23:30:21.000000000 +0200
+++ linux-2.6.13-git4/drivers/media/dvb/dvb-usb/umt-010.c	2005-09-04 23:32:19.000000000 +0200
@@ -77,7 +77,7 @@ static struct dvb_usb_properties umt_pro
 static int umt_probe(struct usb_interface *intf,
 		const struct usb_device_id *id)
 {
-	if (dvb_usb_device_init(intf,&umt_properties,THIS_MODULE) == 0)
+	if (dvb_usb_device_init(intf,&umt_properties,THIS_MODULE,NULL) == 0)
 		return 0;
 	return -EINVAL;
 }
--- linux-2.6.13-git4.orig/drivers/media/dvb/dvb-usb/vp702x.c	2005-09-04 23:32:19.000000000 +0200
+++ linux-2.6.13-git4/drivers/media/dvb/dvb-usb/vp702x.c	2005-09-04 23:32:19.000000000 +0200
@@ -197,7 +197,7 @@ static int vp702x_usb_probe(struct usb_i
 	usb_clear_halt(udev,usb_sndctrlpipe(udev,0));
 	usb_clear_halt(udev,usb_rcvctrlpipe(udev,0));
 
-	return dvb_usb_device_init(intf,&vp702x_properties,THIS_MODULE);
+	return dvb_usb_device_init(intf,&vp702x_properties,THIS_MODULE,NULL);
 }
 
 static struct usb_device_id vp702x_usb_table [] = {
--- linux-2.6.13-git4.orig/drivers/media/dvb/dvb-usb/vp7045.c	2005-09-04 23:30:21.000000000 +0200
+++ linux-2.6.13-git4/drivers/media/dvb/dvb-usb/vp7045.c	2005-09-04 23:32:19.000000000 +0200
@@ -199,7 +199,7 @@ static struct dvb_usb_properties vp7045_
 static int vp7045_usb_probe(struct usb_interface *intf,
 		const struct usb_device_id *id)
 {
-	return dvb_usb_device_init(intf,&vp7045_properties,THIS_MODULE);
+	return dvb_usb_device_init(intf,&vp7045_properties,THIS_MODULE,NULL);
 }
 
 static struct usb_device_id vp7045_usb_table [] = {
--- linux-2.6.13-git4.orig/drivers/media/dvb/dvb-usb/cxusb.c	2005-09-04 23:30:21.000000000 +0200
+++ linux-2.6.13-git4/drivers/media/dvb/dvb-usb/cxusb.c	2005-09-04 23:32:19.000000000 +0200
@@ -213,7 +213,7 @@ static struct dvb_usb_properties cxusb_p
 static int cxusb_probe(struct usb_interface *intf,
 		const struct usb_device_id *id)
 {
-	return dvb_usb_device_init(intf,&cxusb_properties,THIS_MODULE);
+	return dvb_usb_device_init(intf,&cxusb_properties,THIS_MODULE,NULL);
 }
 
 static struct usb_device_id cxusb_table [] = {
--- linux-2.6.13-git4.orig/drivers/media/dvb/dvb-usb/digitv.c	2005-09-04 23:32:12.000000000 +0200
+++ linux-2.6.13-git4/drivers/media/dvb/dvb-usb/digitv.c	2005-09-04 23:32:43.000000000 +0200
@@ -175,7 +175,7 @@ static struct dvb_usb_properties digitv_
 static int digitv_probe(struct usb_interface *intf,
 		const struct usb_device_id *id)
 {
-	return dvb_usb_device_init(intf,&digitv_properties,THIS_MODULE);
+	return dvb_usb_device_init(intf,&digitv_properties,THIS_MODULE,NULL);
 }
 
 static struct usb_device_id digitv_table [] = {

--


  parent reply	other threads:[~2005-09-04 23:43 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-04 23:22 [DVB patch 00/54] DVB update Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 01/54] email address update Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 02/54] remove version.h dependencies Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 03/54] avoid building empty built-in.o Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 04/54] core: glue code for DMX_GET_CAPS and DMX_SET_SOURCE Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 05/54] core: dvb_demux: fix continuity counter error handling Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 06/54] core: dvb_demux: remove unused cruft Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 07/54] core: dvb_demux: remove unsused descramble callbacks Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 08/54] core: dvb_demux: remove more unused cruft Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 09/54] core: dvb_demux: use INIT_LIST_HEAD Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 10/54] core: dvb_demux formatting fixes Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 11/54] core: CI timeout fix Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 12/54] frontend: mt352: fix signal strength reading Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 13/54] frontend: stv0299: pass i2c bus to pll callback Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 14/54] frontend: s5h1420: fixes Johannes Stezenbach
2005-09-04 23:56   ` Nish Aravamudan
2005-09-05  8:45     ` Andrew de Quincey
2005-09-04 23:23 ` [DVB patch 15/54] frontend: stv0299: support reading both BER and UCBLOCKS Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 16/54] frontend: tda1004x: fix SNR reading Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 17/54] frontend: ves1820: improve tuning Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 18/54] frontend: cx24110: DiSEqC fix Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 19/54] frontend: cx24110: another " Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 20/54] frontend: cx24110: clean up timeout handling Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 21/54] frontend: stv0297: QAM128 tuning improvement Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 22/54] frontend: or51132: remove bogus optimization attempt Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 23/54] usb: add TwinhanDTV StarBox support Johannes Stezenbach
2005-09-04 23:52   ` Nish Aravamudan
2005-09-04 23:23 ` [DVB patch 24/54] usb: dibusb: Kworld Xpert DVB-T USB2.0 support Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 25/54] usb: removed empty module_init/exit calls Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 26/54] usb: dtt200u: copy frontend_ops before modifying Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 27/54] usb: dtt200u: add proper device names Johannes Stezenbach
2005-09-04 23:23 ` Johannes Stezenbach [this message]
2005-09-04 23:23 ` [DVB patch 29/54] usb: digitv: support for nxt6000 demod Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 30/54] usb: white space cleanup Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 31/54] usb: cxusb: fixes for new firmware Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 32/54] remove noisy debug print Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 33/54] bt8xx: endianness fix Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 34/54] bt8xx: cleanup Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 35/54] bt8xx: Nebula DigiTV mt352 support Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 36/54] Nebula DigiTV nxt6000 fix Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 37/54] dst: fix symbol rate setting Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 38/54] dst: remove unnecessary code Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 39/54] dst: dprrintk cleanup Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 40/54] dst: identify boards Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 41/54] dst: fix DVB-C tuning Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 42/54] dst: ci doc update Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 43/54] dst: Updated Documentation Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 44/54] cinergyT2: remote control fixes Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 45/54] av7110: Siemens DVB-C analog video input support Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 46/54] budget-ci: add support for TT DVB-C CI card Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 47/54] budget-av: fixes for CI interface Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 48/54] budget-av: enable frontend on KNC1 Plus cards Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 49/54] av7110: disable superflous firmware handshake Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 50/54] av7110: conditionally disable workaround for broken firmware Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 51/54] ttpci: av7110: RC5+ remote control support Johannes Stezenbach
2005-09-04 23:41   ` Nish Aravamudan
2005-09-05  0:13     ` Johannes Stezenbach
2005-09-05  0:16       ` Nish Aravamudan
2005-09-05  0:27         ` Johannes Stezenbach
2005-09-05  0:34           ` Nish Aravamudan
2005-09-04 23:23 ` [DVB patch 52/54] ttpci: add PCI ids for old Siemens/TT DVB-C card Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 53/54] saa7146: i2c vs. sysfs fix Johannes Stezenbach
2005-09-04 23:23 ` [DVB patch 54/54] ttusb-budget: use time_after_eq() Johannes Stezenbach
2005-09-04 23:45   ` Nish Aravamudan
2005-09-05  0:07     ` Johannes Stezenbach
2005-09-05  0:14       ` Nish Aravamudan
2005-09-05  0:19         ` Johannes Stezenbach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050904232326.850589000@abc \
    --to=js@linuxtv.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pb@linuxtv.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox