summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dibusb/dvb-dibusb-usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/dvb/dibusb/dvb-dibusb-usb.c')
-rw-r--r--linux/drivers/media/dvb/dibusb/dvb-dibusb-usb.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/linux/drivers/media/dvb/dibusb/dvb-dibusb-usb.c b/linux/drivers/media/dvb/dibusb/dvb-dibusb-usb.c
index 4f07b5063..2cd57eb1c 100644
--- a/linux/drivers/media/dvb/dibusb/dvb-dibusb-usb.c
+++ b/linux/drivers/media/dvb/dibusb/dvb-dibusb-usb.c
@@ -27,14 +27,14 @@ int dibusb_readwrite_usb(struct usb_dibusb *dib, u8 *wbuf, u16 wlen, u8 *rbuf,
if (dib->feedcount &&
wbuf[0] == DIBUSB_REQ_I2C_WRITE &&
- dib->dibdev->parm->type == DIBUSB1_1)
+ dib->dibdev->dev_cl->id == DIBUSB1_1)
deb_err("BUG: writing to i2c, while TS-streaming destroys the stream."
"(%x reg: %x %x)\n", wbuf[0],wbuf[2],wbuf[3]);
debug_dump(wbuf,wlen);
ret = usb_bulk_msg(dib->udev,usb_sndbulkpipe(dib->udev,
- dib->dibdev->parm->cmd_pipe), wbuf,wlen,&actlen,
+ dib->dibdev->dev_cl->pipe_cmd), wbuf,wlen,&actlen,
DIBUSB_I2C_TIMEOUT);
if (ret)
@@ -45,7 +45,7 @@ int dibusb_readwrite_usb(struct usb_dibusb *dib, u8 *wbuf, u16 wlen, u8 *rbuf,
/* an answer is expected, and no error before */
if (!ret && rbuf && rlen) {
ret = usb_bulk_msg(dib->udev,usb_rcvbulkpipe(dib->udev,
- dib->dibdev->parm->result_pipe),rbuf,rlen,&actlen,
+ dib->dibdev->dev_cl->pipe_cmd),rbuf,rlen,&actlen,
DIBUSB_I2C_TIMEOUT);
if (ret)
@@ -140,19 +140,19 @@ int dibusb_urb_init(struct usb_dibusb *dib)
* when reloading the driver w/o replugging the device
* a timeout occures, this helps
*/
- usb_clear_halt(dib->udev,usb_sndbulkpipe(dib->udev,dib->dibdev->parm->cmd_pipe));
- usb_clear_halt(dib->udev,usb_rcvbulkpipe(dib->udev,dib->dibdev->parm->result_pipe));
- usb_clear_halt(dib->udev,usb_rcvbulkpipe(dib->udev,dib->dibdev->parm->data_pipe));
+ usb_clear_halt(dib->udev,usb_sndbulkpipe(dib->udev,dib->dibdev->dev_cl->pipe_cmd));
+ usb_clear_halt(dib->udev,usb_rcvbulkpipe(dib->udev,dib->dibdev->dev_cl->pipe_cmd));
+ usb_clear_halt(dib->udev,usb_rcvbulkpipe(dib->udev,dib->dibdev->dev_cl->pipe_data));
/* allocate the array for the data transfer URBs */
- dib->urb_list = kmalloc(dib->dibdev->parm->num_urbs*sizeof(struct urb *),GFP_KERNEL);
+ dib->urb_list = kmalloc(dib->dibdev->dev_cl->urb_count*sizeof(struct urb *),GFP_KERNEL);
if (dib->urb_list == NULL)
return -ENOMEM;
- memset(dib->urb_list,0,dib->dibdev->parm->num_urbs*sizeof(struct urb *));
+ memset(dib->urb_list,0,dib->dibdev->dev_cl->urb_count*sizeof(struct urb *));
dib->init_state |= DIBUSB_STATE_URB_LIST;
- bufsize = dib->dibdev->parm->num_urbs*dib->dibdev->parm->urb_buf_size;
+ bufsize = dib->dibdev->dev_cl->urb_count*dib->dibdev->dev_cl->urb_buffer_size;
deb_info("allocate %d bytes as buffersize for all URBs\n",bufsize);
/* allocate the actual buffer for the URBs */
if ((dib->buffer = pci_alloc_consistent(NULL,bufsize,&dib->dma_handle)) == NULL) {
@@ -165,16 +165,16 @@ int dibusb_urb_init(struct usb_dibusb *dib)
dib->init_state |= DIBUSB_STATE_URB_BUF;
/* allocate and submit the URBs */
- for (i = 0; i < dib->dibdev->parm->num_urbs; i++) {
+ for (i = 0; i < dib->dibdev->dev_cl->urb_count; i++) {
if (!(dib->urb_list[i] = usb_alloc_urb(0,GFP_ATOMIC))) {
return -ENOMEM;
}
deb_info("submitting URB no. %d\n",i);
usb_fill_bulk_urb( dib->urb_list[i], dib->udev,
- usb_rcvbulkpipe(dib->udev,dib->dibdev->parm->data_pipe),
- &dib->buffer[i*dib->dibdev->parm->urb_buf_size],
- dib->dibdev->parm->urb_buf_size,
+ usb_rcvbulkpipe(dib->udev,dib->dibdev->dev_cl->pipe_data),
+ &dib->buffer[i*dib->dibdev->dev_cl->urb_buffer_size],
+ dib->dibdev->dev_cl->urb_buffer_size,
dibusb_urb_complete, dib);
dib->urb_list[i]->transfer_flags = 0;
@@ -195,7 +195,7 @@ int dibusb_urb_exit(struct usb_dibusb *dib)
{
int i;
if (dib->init_state & DIBUSB_STATE_URB_LIST) {
- for (i = 0; i < dib->dibdev->parm->num_urbs; i++) {
+ for (i = 0; i < dib->dibdev->dev_cl->urb_count; i++) {
if (dib->urb_list[i] != NULL) {
deb_info("killing URB no. %d.\n",i);
@@ -219,7 +219,7 @@ int dibusb_urb_exit(struct usb_dibusb *dib)
if (dib->init_state & DIBUSB_STATE_URB_BUF)
pci_free_consistent(NULL,
- dib->dibdev->parm->urb_buf_size*dib->dibdev->parm->num_urbs,
+ dib->dibdev->dev_cl->urb_buffer_size*dib->dibdev->dev_cl->urb_count,
dib->buffer,dib->dma_handle);
dib->init_state &= ~DIBUSB_STATE_URB_BUF;