hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/media/usb/dvb-usb/dvb-usb.h
....@@ -129,6 +129,9 @@
129129 * @frontend_ctrl: called to power on/off active frontend.
130130 * @streaming_ctrl: called to start and stop the MPEG2-TS streaming of the
131131 * device (not URB submitting/killing).
132
+ * This callback will be called without data URBs being active - data URBs
133
+ * will be submitted only after streaming_ctrl(1) returns successfully and
134
+ * they will be killed before streaming_ctrl(0) gets called.
132135 * @pid_filter_ctrl: called to en/disable the PID filter, if any.
133136 * @pid_filter: called to set/unset a PID for filtering.
134137 * @frontend_attach: called to attach the possible frontends (fill fe-field
....@@ -234,6 +237,11 @@
234237 *
235238 * @size_of_priv: how many bytes shall be allocated for the private field
236239 * of struct dvb_usb_device.
240
+ * @priv_init: optional callback to initialize the variable that private field
241
+ * of struct dvb_usb_device has pointer to just after it had been allocated and
242
+ * zeroed.
243
+ * @priv_destroy: just like priv_init, only called before deallocating
244
+ * the memory pointed by private field of struct dvb_usb_device.
237245 *
238246 * @power_ctrl: called to enable/disable power of the device.
239247 * @read_mac_address: called to read the MAC address of the device.
....@@ -275,14 +283,18 @@
275283 int no_reconnect;
276284
277285 int size_of_priv;
286
+ int (*priv_init)(struct dvb_usb_device *);
287
+ void (*priv_destroy)(struct dvb_usb_device *);
278288
279289 int num_adapters;
280290 struct dvb_usb_adapter_properties adapter[MAX_NO_OF_ADAPTER_PER_DEVICE];
281291
282292 int (*power_ctrl) (struct dvb_usb_device *, int);
283293 int (*read_mac_address) (struct dvb_usb_device *, u8 []);
284
- int (*identify_state) (struct usb_device *, struct dvb_usb_device_properties *,
285
- struct dvb_usb_device_description **, int *);
294
+ int (*identify_state)(struct usb_device *udev,
295
+ const struct dvb_usb_device_properties *props,
296
+ const struct dvb_usb_device_description **desc,
297
+ int *cold);
286298
287299 struct {
288300 enum dvb_usb_mode mode; /* Drivers shouldn't touch on it */
....@@ -336,7 +348,7 @@
336348 * struct dvb_usb_adapter - a DVB adapter on a USB device
337349 * @id: index of this adapter (starting with 0).
338350 *
339
- * @feedcount: number of reqested feeds (used for streaming-activation)
351
+ * @feedcount: number of requested feeds (used for streaming-activation)
340352 * @pid_filtering: is hardware pid_filtering used or not.
341353 *
342354 * @pll_addr: I2C address of the tuner for programming
....@@ -426,7 +438,7 @@
426438 */
427439 struct dvb_usb_device {
428440 struct dvb_usb_device_properties props;
429
- struct dvb_usb_device_description *desc;
441
+ const struct dvb_usb_device_description *desc;
430442
431443 struct usb_device *udev;
432444
....@@ -463,7 +475,7 @@
463475 };
464476
465477 extern int dvb_usb_device_init(struct usb_interface *,
466
- struct dvb_usb_device_properties *,
478
+ const struct dvb_usb_device_properties *,
467479 struct module *, struct dvb_usb_device **,
468480 short *adapter_nums);
469481 extern void dvb_usb_device_exit(struct usb_interface *);