airspy.c (16217dc79dbc599b110dda26d0421df47904bba4) | airspy.c (1bc177174b97e4df8d27b6c3cdd79ffea9e2d18e) |
---|---|
1/* 2 * AirSpy SDR driver 3 * 4 * Copyright (C) 2014 Antti Palosaari <crope@iki.fi> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 412 unchanged lines hidden (view full) --- 421{ 422 int i, j; 423 424 /* allocate the URBs */ 425 for (i = 0; i < MAX_BULK_BUFS; i++) { 426 dev_dbg(s->dev, "alloc urb=%d\n", i); 427 s->urb_list[i] = usb_alloc_urb(0, GFP_ATOMIC); 428 if (!s->urb_list[i]) { | 1/* 2 * AirSpy SDR driver 3 * 4 * Copyright (C) 2014 Antti Palosaari <crope@iki.fi> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 412 unchanged lines hidden (view full) --- 421{ 422 int i, j; 423 424 /* allocate the URBs */ 425 for (i = 0; i < MAX_BULK_BUFS; i++) { 426 dev_dbg(s->dev, "alloc urb=%d\n", i); 427 s->urb_list[i] = usb_alloc_urb(0, GFP_ATOMIC); 428 if (!s->urb_list[i]) { |
429 dev_dbg(s->dev, "failed\n"); | |
430 for (j = 0; j < i; j++) 431 usb_free_urb(s->urb_list[j]); 432 return -ENOMEM; 433 } 434 usb_fill_bulk_urb(s->urb_list[i], 435 s->udev, 436 usb_rcvbulkpipe(s->udev, 0x81), 437 s->buf_list[i], --- 163 unchanged lines hidden (view full) --- 601 602 airspy_cleanup_queued_bufs(s); 603 604 clear_bit(POWER_ON, &s->flags); 605 606 mutex_unlock(&s->v4l2_lock); 607} 608 | 429 for (j = 0; j < i; j++) 430 usb_free_urb(s->urb_list[j]); 431 return -ENOMEM; 432 } 433 usb_fill_bulk_urb(s->urb_list[i], 434 s->udev, 435 usb_rcvbulkpipe(s->udev, 0x81), 436 s->buf_list[i], --- 163 unchanged lines hidden (view full) --- 600 601 airspy_cleanup_queued_bufs(s); 602 603 clear_bit(POWER_ON, &s->flags); 604 605 mutex_unlock(&s->v4l2_lock); 606} 607 |
609static struct vb2_ops airspy_vb2_ops = { | 608static const struct vb2_ops airspy_vb2_ops = { |
610 .queue_setup = airspy_queue_setup, 611 .buf_queue = airspy_buf_queue, 612 .start_streaming = airspy_start_streaming, 613 .stop_streaming = airspy_stop_streaming, 614 .wait_prepare = vb2_ops_wait_prepare, 615 .wait_finish = vb2_ops_wait_finish, 616}; 617 --- 492 unchanged lines hidden --- | 609 .queue_setup = airspy_queue_setup, 610 .buf_queue = airspy_buf_queue, 611 .start_streaming = airspy_start_streaming, 612 .stop_streaming = airspy_stop_streaming, 613 .wait_prepare = vb2_ops_wait_prepare, 614 .wait_finish = vb2_ops_wait_finish, 615}; 616 --- 492 unchanged lines hidden --- |