flexcop-usb.c (c95baf12f5077419db01313ab61c2aac007d40cd) | flexcop-usb.c (bca243b1ce0e46be26f7c63b5591dfbb41f558e5) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Linux driver for digital TV devices equipped with B2C2 FlexcopII(b)/III 4 * flexcop-usb.c - covers the USB part 5 * see flexcop.c for copyright information 6 */ 7#define FC_LOG_PREFIX "flexcop_usb" 8#include "flexcop-usb.h" --- 497 unchanged lines hidden (view full) --- 506 /* use the alternate setting with the larges buffer */ 507 int ret = usb_set_interface(fc_usb->udev, 0, 1); 508 509 if (ret) { 510 err("set interface failed."); 511 return ret; 512 } 513 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Linux driver for digital TV devices equipped with B2C2 FlexcopII(b)/III 4 * flexcop-usb.c - covers the USB part 5 * see flexcop.c for copyright information 6 */ 7#define FC_LOG_PREFIX "flexcop_usb" 8#include "flexcop-usb.h" --- 497 unchanged lines hidden (view full) --- 506 /* use the alternate setting with the larges buffer */ 507 int ret = usb_set_interface(fc_usb->udev, 0, 1); 508 509 if (ret) { 510 err("set interface failed."); 511 return ret; 512 } 513 |
514 if (fc_usb->uintf->cur_altsetting->desc.bNumEndpoints < 1) 515 return -ENODEV; 516 |
|
514 switch (fc_usb->udev->speed) { 515 case USB_SPEED_LOW: 516 err("cannot handle USB speed because it is too slow."); 517 return -ENODEV; 518 break; 519 case USB_SPEED_FULL: 520 info("running at FULL speed."); 521 break; --- 17 unchanged lines hidden (view full) --- 539static int flexcop_usb_probe(struct usb_interface *intf, 540 const struct usb_device_id *id) 541{ 542 struct usb_device *udev = interface_to_usbdev(intf); 543 struct flexcop_usb *fc_usb = NULL; 544 struct flexcop_device *fc = NULL; 545 int ret; 546 | 517 switch (fc_usb->udev->speed) { 518 case USB_SPEED_LOW: 519 err("cannot handle USB speed because it is too slow."); 520 return -ENODEV; 521 break; 522 case USB_SPEED_FULL: 523 info("running at FULL speed."); 524 break; --- 17 unchanged lines hidden (view full) --- 542static int flexcop_usb_probe(struct usb_interface *intf, 543 const struct usb_device_id *id) 544{ 545 struct usb_device *udev = interface_to_usbdev(intf); 546 struct flexcop_usb *fc_usb = NULL; 547 struct flexcop_device *fc = NULL; 548 int ret; 549 |
547 if (intf->cur_altsetting->desc.bNumEndpoints < 1) 548 return -ENODEV; 549 | |
550 if ((fc = flexcop_device_kmalloc(sizeof(struct flexcop_usb))) == NULL) { 551 err("out of memory\n"); 552 return -ENOMEM; 553 } 554 555 /* general flexcop init */ 556 fc_usb = fc->bus_specific; 557 fc_usb->fc_dev = fc; --- 70 unchanged lines hidden --- | 550 if ((fc = flexcop_device_kmalloc(sizeof(struct flexcop_usb))) == NULL) { 551 err("out of memory\n"); 552 return -ENOMEM; 553 } 554 555 /* general flexcop init */ 556 fc_usb = fc->bus_specific; 557 fc_usb->fc_dev = fc; --- 70 unchanged lines hidden --- |