aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb
diff options
context:
space:
mode:
authorPatrick Boettcher <pb@linuxtv.org>2005-09-09 16:02:47 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 16:57:41 -0400
commit47dc3d688d04f06d8ef90a06c48930906fbc4a8c (patch)
tree705fc3f433180d96e357bdcf4814408169367018 /drivers/media/dvb/dvb-usb
parent62703b9d72114a563488cd4be6d0827618395589 (diff)
[PATCH] dvb: usb: core: change dvb_usb_device_init() API
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> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/dvb/dvb-usb')
-rw-r--r--drivers/media/dvb/dvb-usb/a800.c2
-rw-r--r--drivers/media/dvb/dvb-usb/cxusb.c2
-rw-r--r--drivers/media/dvb/dvb-usb/dibusb-mb.c6
-rw-r--r--drivers/media/dvb/dvb-usb/dibusb-mc.c2
-rw-r--r--drivers/media/dvb/dvb-usb/digitv.c2
-rw-r--r--drivers/media/dvb/dvb-usb/dtt200u.c4
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-ids.h3
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-init.c7
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb.h4
-rw-r--r--drivers/media/dvb/dvb-usb/nova-t-usb2.c2
-rw-r--r--drivers/media/dvb/dvb-usb/umt-010.c2
-rw-r--r--drivers/media/dvb/dvb-usb/vp702x.c2
-rw-r--r--drivers/media/dvb/dvb-usb/vp7045.c2
13 files changed, 24 insertions, 16 deletions
diff --git a/drivers/media/dvb/dvb-usb/a800.c b/drivers/media/dvb/dvb-usb/a800.c
index f2fcc2f1f846..e55322ef76b3 100644
--- a/drivers/media/dvb/dvb-usb/a800.c
+++ b/drivers/media/dvb/dvb-usb/a800.c
@@ -90,7 +90,7 @@ static struct dvb_usb_properties a800_properties;
90static int a800_probe(struct usb_interface *intf, 90static int a800_probe(struct usb_interface *intf,
91 const struct usb_device_id *id) 91 const struct usb_device_id *id)
92{ 92{
93 return dvb_usb_device_init(intf,&a800_properties,THIS_MODULE); 93 return dvb_usb_device_init(intf,&a800_properties,THIS_MODULE,NULL);
94} 94}
95 95
96/* do not change the order of the ID table */ 96/* do not change the order of the ID table */
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c
index 9e96a188f1e9..d2be03514012 100644
--- a/drivers/media/dvb/dvb-usb/cxusb.c
+++ b/drivers/media/dvb/dvb-usb/cxusb.c
@@ -211,7 +211,7 @@ static struct dvb_usb_properties cxusb_properties;
211static int cxusb_probe(struct usb_interface *intf, 211static int cxusb_probe(struct usb_interface *intf,
212 const struct usb_device_id *id) 212 const struct usb_device_id *id)
213{ 213{
214 return dvb_usb_device_init(intf,&cxusb_properties,THIS_MODULE); 214 return dvb_usb_device_init(intf,&cxusb_properties,THIS_MODULE,NULL);
215} 215}
216 216
217static struct usb_device_id cxusb_table [] = { 217static struct usb_device_id cxusb_table [] = {
diff --git a/drivers/media/dvb/dvb-usb/dibusb-mb.c b/drivers/media/dvb/dvb-usb/dibusb-mb.c
index c9f3e90ee25f..0058505634a0 100644
--- a/drivers/media/dvb/dvb-usb/dibusb-mb.c
+++ b/drivers/media/dvb/dvb-usb/dibusb-mb.c
@@ -86,9 +86,9 @@ static struct dvb_usb_properties dibusb2_0b_properties;
86static int dibusb_probe(struct usb_interface *intf, 86static int dibusb_probe(struct usb_interface *intf,
87 const struct usb_device_id *id) 87 const struct usb_device_id *id)
88{ 88{
89 if (dvb_usb_device_init(intf,&dibusb1_1_properties,THIS_MODULE) == 0 || 89 if (dvb_usb_device_init(intf,&dibusb1_1_properties,THIS_MODULE,NULL) == 0 ||
90 dvb_usb_device_init(intf,&dibusb1_1_an2235_properties,THIS_MODULE) == 0 || 90 dvb_usb_device_init(intf,&dibusb1_1_an2235_properties,THIS_MODULE,NULL) == 0 ||
91 dvb_usb_device_init(intf,&dibusb2_0b_properties,THIS_MODULE) == 0) 91 dvb_usb_device_init(intf,&dibusb2_0b_properties,THIS_MODULE,NULL) == 0)
92 return 0; 92 return 0;
93 93
94 return -EINVAL; 94 return -EINVAL;
diff --git a/drivers/media/dvb/dvb-usb/dibusb-mc.c b/drivers/media/dvb/dvb-usb/dibusb-mc.c
index e9dac430f37d..6a0912eab396 100644
--- a/drivers/media/dvb/dvb-usb/dibusb-mc.c
+++ b/drivers/media/dvb/dvb-usb/dibusb-mc.c
@@ -20,7 +20,7 @@ static struct dvb_usb_properties dibusb_mc_properties;
20static int dibusb_mc_probe(struct usb_interface *intf, 20static int dibusb_mc_probe(struct usb_interface *intf,
21 const struct usb_device_id *id) 21 const struct usb_device_id *id)
22{ 22{
23 return dvb_usb_device_init(intf,&dibusb_mc_properties,THIS_MODULE); 23 return dvb_usb_device_init(intf,&dibusb_mc_properties,THIS_MODULE,NULL);
24} 24}
25 25
26/* do not change the order of the ID table */ 26/* do not change the order of the ID table */
diff --git a/drivers/media/dvb/dvb-usb/digitv.c b/drivers/media/dvb/dvb-usb/digitv.c
index f70e0be0920a..24d2bc6ca97b 100644
--- a/drivers/media/dvb/dvb-usb/digitv.c
+++ b/drivers/media/dvb/dvb-usb/digitv.c
@@ -173,7 +173,7 @@ static struct dvb_usb_properties digitv_properties;
173static int digitv_probe(struct usb_interface *intf, 173static int digitv_probe(struct usb_interface *intf,
174 const struct usb_device_id *id) 174 const struct usb_device_id *id)
175{ 175{
176 return dvb_usb_device_init(intf,&digitv_properties,THIS_MODULE); 176 return dvb_usb_device_init(intf,&digitv_properties,THIS_MODULE,NULL);
177} 177}
178 178
179static struct usb_device_id digitv_table [] = { 179static struct usb_device_id digitv_table [] = {
diff --git a/drivers/media/dvb/dvb-usb/dtt200u.c b/drivers/media/dvb/dvb-usb/dtt200u.c
index 9d74f48284fa..5aa12ebab34f 100644
--- a/drivers/media/dvb/dvb-usb/dtt200u.c
+++ b/drivers/media/dvb/dvb-usb/dtt200u.c
@@ -98,8 +98,8 @@ static struct dvb_usb_properties wt220u_properties;
98static int dtt200u_usb_probe(struct usb_interface *intf, 98static int dtt200u_usb_probe(struct usb_interface *intf,
99 const struct usb_device_id *id) 99 const struct usb_device_id *id)
100{ 100{
101 if (dvb_usb_device_init(intf,&dtt200u_properties,THIS_MODULE) == 0 || 101 if (dvb_usb_device_init(intf,&dtt200u_properties,THIS_MODULE,NULL) == 0 ||
102 dvb_usb_device_init(intf,&wt220u_properties,THIS_MODULE) == 0) 102 dvb_usb_device_init(intf,&wt220u_properties,THIS_MODULE,NULL) == 0)
103 return 0; 103 return 0;
104 104
105 return -ENODEV; 105 return -ENODEV;
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
index 1b978389e4ec..0818996bf150 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
@@ -27,6 +27,7 @@
27#define USB_VID_KWORLD 0xeb2a 27#define USB_VID_KWORLD 0xeb2a
28#define USB_VID_KYE 0x0458 28#define USB_VID_KYE 0x0458
29#define USB_VID_MEDION 0x1660 29#define USB_VID_MEDION 0x1660
30#define USB_VID_PINNACLE 0x2304
30#define USB_VID_VISIONPLUS 0x13d3 31#define USB_VID_VISIONPLUS 0x13d3
31#define USB_VID_TWINHAN 0x1822 32#define USB_VID_TWINHAN 0x1822
32#define USB_VID_ULTIMA_ELECTRONIC 0x05d8 33#define USB_VID_ULTIMA_ELECTRONIC 0x05d8
@@ -88,5 +89,7 @@
88#define USB_PID_MEDION_MD95700 0x0932 89#define USB_PID_MEDION_MD95700 0x0932
89#define USB_PID_KYE_DVB_T_COLD 0x701e 90#define USB_PID_KYE_DVB_T_COLD 0x701e
90#define USB_PID_KYE_DVB_T_WARM 0x701f 91#define USB_PID_KYE_DVB_T_WARM 0x701f
92#define USB_PID_PCTV_200E 0x020e
93#define USB_PID_PCTV_400E 0x020f
91 94
92#endif 95#endif
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-init.c b/drivers/media/dvb/dvb-usb/dvb-usb-init.c
index ea1098a6c7a8..a902059812a2 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-init.c
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-init.c
@@ -128,7 +128,9 @@ static struct dvb_usb_device_description * dvb_usb_find_device(struct usb_device
128/* 128/*
129 * USB 129 * USB
130 */ 130 */
131int dvb_usb_device_init(struct usb_interface *intf, struct dvb_usb_properties *props, struct module *owner) 131
132int dvb_usb_device_init(struct usb_interface *intf, struct dvb_usb_properties
133 *props, struct module *owner,struct dvb_usb_device **du)
132{ 134{
133 struct usb_device *udev = interface_to_usbdev(intf); 135 struct usb_device *udev = interface_to_usbdev(intf);
134 struct dvb_usb_device *d = NULL; 136 struct dvb_usb_device *d = NULL;
@@ -170,6 +172,9 @@ int dvb_usb_device_init(struct usb_interface *intf, struct dvb_usb_properties *p
170 172
171 usb_set_intfdata(intf, d); 173 usb_set_intfdata(intf, d);
172 174
175 if (du != NULL)
176 *du = d;
177
173 ret = dvb_usb_init(d); 178 ret = dvb_usb_init(d);
174 } 179 }
175 180
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h
index a80567caf508..0e4f1035b0dd 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb.h
+++ b/drivers/media/dvb/dvb-usb/dvb-usb.h
@@ -127,7 +127,7 @@ struct dvb_usb_device;
127 * helper functions. 127 * helper functions.
128 * 128 *
129 * @urb: describes the kind of USB transfer used for MPEG2-TS-streaming. 129 * @urb: describes the kind of USB transfer used for MPEG2-TS-streaming.
130 * Currently only BULK is implemented 130 * (BULK or ISOC)
131 * 131 *
132 * @num_device_descs: number of struct dvb_usb_device_description in @devices 132 * @num_device_descs: number of struct dvb_usb_device_description in @devices
133 * @devices: array of struct dvb_usb_device_description compatibles with these 133 * @devices: array of struct dvb_usb_device_description compatibles with these
@@ -310,7 +310,7 @@ struct dvb_usb_device {
310 void *priv; 310 void *priv;
311}; 311};
312 312
313extern int dvb_usb_device_init(struct usb_interface *, struct dvb_usb_properties *, struct module *); 313extern int dvb_usb_device_init(struct usb_interface *, struct dvb_usb_properties *, struct module *, struct dvb_usb_device **);
314extern void dvb_usb_device_exit(struct usb_interface *); 314extern void dvb_usb_device_exit(struct usb_interface *);
315 315
316/* the generic read/write method for device control */ 316/* the generic read/write method for device control */
diff --git a/drivers/media/dvb/dvb-usb/nova-t-usb2.c b/drivers/media/dvb/dvb-usb/nova-t-usb2.c
index 258a92bfbcc7..1841a66427bf 100644
--- a/drivers/media/dvb/dvb-usb/nova-t-usb2.c
+++ b/drivers/media/dvb/dvb-usb/nova-t-usb2.c
@@ -144,7 +144,7 @@ static struct dvb_usb_properties nova_t_properties;
144static int nova_t_probe(struct usb_interface *intf, 144static int nova_t_probe(struct usb_interface *intf,
145 const struct usb_device_id *id) 145 const struct usb_device_id *id)
146{ 146{
147 return dvb_usb_device_init(intf,&nova_t_properties,THIS_MODULE); 147 return dvb_usb_device_init(intf,&nova_t_properties,THIS_MODULE,NULL);
148} 148}
149 149
150/* do not change the order of the ID table */ 150/* do not change the order of the ID table */
diff --git a/drivers/media/dvb/dvb-usb/umt-010.c b/drivers/media/dvb/dvb-usb/umt-010.c
index 2112ac3cf5e2..6fd67657c269 100644
--- a/drivers/media/dvb/dvb-usb/umt-010.c
+++ b/drivers/media/dvb/dvb-usb/umt-010.c
@@ -77,7 +77,7 @@ static struct dvb_usb_properties umt_properties;
77static int umt_probe(struct usb_interface *intf, 77static int umt_probe(struct usb_interface *intf,
78 const struct usb_device_id *id) 78 const struct usb_device_id *id)
79{ 79{
80 if (dvb_usb_device_init(intf,&umt_properties,THIS_MODULE) == 0) 80 if (dvb_usb_device_init(intf,&umt_properties,THIS_MODULE,NULL) == 0)
81 return 0; 81 return 0;
82 return -EINVAL; 82 return -EINVAL;
83} 83}
diff --git a/drivers/media/dvb/dvb-usb/vp702x.c b/drivers/media/dvb/dvb-usb/vp702x.c
index 1f5034ca1152..de13c04e8e64 100644
--- a/drivers/media/dvb/dvb-usb/vp702x.c
+++ b/drivers/media/dvb/dvb-usb/vp702x.c
@@ -197,7 +197,7 @@ static int vp702x_usb_probe(struct usb_interface *intf,
197 usb_clear_halt(udev,usb_sndctrlpipe(udev,0)); 197 usb_clear_halt(udev,usb_sndctrlpipe(udev,0));
198 usb_clear_halt(udev,usb_rcvctrlpipe(udev,0)); 198 usb_clear_halt(udev,usb_rcvctrlpipe(udev,0));
199 199
200 return dvb_usb_device_init(intf,&vp702x_properties,THIS_MODULE); 200 return dvb_usb_device_init(intf,&vp702x_properties,THIS_MODULE,NULL);
201} 201}
202 202
203static struct usb_device_id vp702x_usb_table [] = { 203static struct usb_device_id vp702x_usb_table [] = {
diff --git a/drivers/media/dvb/dvb-usb/vp7045.c b/drivers/media/dvb/dvb-usb/vp7045.c
index 9ac95f54f9fc..13406a8da247 100644
--- a/drivers/media/dvb/dvb-usb/vp7045.c
+++ b/drivers/media/dvb/dvb-usb/vp7045.c
@@ -199,7 +199,7 @@ static struct dvb_usb_properties vp7045_properties;
199static int vp7045_usb_probe(struct usb_interface *intf, 199static int vp7045_usb_probe(struct usb_interface *intf,
200 const struct usb_device_id *id) 200 const struct usb_device_id *id)
201{ 201{
202 return dvb_usb_device_init(intf,&vp7045_properties,THIS_MODULE); 202 return dvb_usb_device_init(intf,&vp7045_properties,THIS_MODULE,NULL);
203} 203}
204 204
205static struct usb_device_id vp7045_usb_table [] = { 205static struct usb_device_id vp7045_usb_table [] = {