yurex.c (05909cd9a0c8811731b38697af13075e8954314f) | yurex.c (93c747ed00c1c74316645f7761f0cdb3f3d3952d) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Driver for Meywa-Denki & KAYAC YUREX 4 * 5 * Copyright (C) 2010 Tomoki Sekiyama (tomoki.sekiyama@gmail.com) 6 */ 7 8#include <linux/kernel.h> --- 82 unchanged lines hidden (view full) --- 91{ 92 struct usb_yurex *dev = to_yurex_dev(kref); 93 94 dev_dbg(&dev->interface->dev, "%s\n", __func__); 95 96 if (dev->cntl_urb) { 97 usb_kill_urb(dev->cntl_urb); 98 kfree(dev->cntl_req); | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Driver for Meywa-Denki & KAYAC YUREX 4 * 5 * Copyright (C) 2010 Tomoki Sekiyama (tomoki.sekiyama@gmail.com) 6 */ 7 8#include <linux/kernel.h> --- 82 unchanged lines hidden (view full) --- 91{ 92 struct usb_yurex *dev = to_yurex_dev(kref); 93 94 dev_dbg(&dev->interface->dev, "%s\n", __func__); 95 96 if (dev->cntl_urb) { 97 usb_kill_urb(dev->cntl_urb); 98 kfree(dev->cntl_req); |
99 if (dev->cntl_buffer) 100 usb_free_coherent(dev->udev, YUREX_BUF_SIZE, | 99 usb_free_coherent(dev->udev, YUREX_BUF_SIZE, |
101 dev->cntl_buffer, dev->cntl_urb->transfer_dma); 102 usb_free_urb(dev->cntl_urb); 103 } 104 if (dev->urb) { 105 usb_kill_urb(dev->urb); | 100 dev->cntl_buffer, dev->cntl_urb->transfer_dma); 101 usb_free_urb(dev->cntl_urb); 102 } 103 if (dev->urb) { 104 usb_kill_urb(dev->urb); |
106 if (dev->int_buffer) 107 usb_free_coherent(dev->udev, YUREX_BUF_SIZE, | 105 usb_free_coherent(dev->udev, YUREX_BUF_SIZE, |
108 dev->int_buffer, dev->urb->transfer_dma); 109 usb_free_urb(dev->urb); 110 } 111 usb_put_intf(dev->interface); 112 usb_put_dev(dev->udev); 113 kfree(dev); 114} 115 --- 18 unchanged lines hidden (view full) --- 134 switch (status) { 135 case 0: /*success*/ 136 break; 137 /* The device is terminated or messed up, give up */ 138 case -EOVERFLOW: 139 dev_err(&dev->interface->dev, 140 "%s - overflow with length %d, actual length is %d\n", 141 __func__, YUREX_BUF_SIZE, dev->urb->actual_length); | 106 dev->int_buffer, dev->urb->transfer_dma); 107 usb_free_urb(dev->urb); 108 } 109 usb_put_intf(dev->interface); 110 usb_put_dev(dev->udev); 111 kfree(dev); 112} 113 --- 18 unchanged lines hidden (view full) --- 132 switch (status) { 133 case 0: /*success*/ 134 break; 135 /* The device is terminated or messed up, give up */ 136 case -EOVERFLOW: 137 dev_err(&dev->interface->dev, 138 "%s - overflow with length %d, actual length is %d\n", 139 __func__, YUREX_BUF_SIZE, dev->urb->actual_length); |
140 return; |
|
142 case -ECONNRESET: 143 case -ENOENT: 144 case -ESHUTDOWN: 145 case -EILSEQ: 146 case -EPROTO: 147 case -ETIME: 148 return; 149 default: --- 379 unchanged lines hidden --- | 141 case -ECONNRESET: 142 case -ENOENT: 143 case -ESHUTDOWN: 144 case -EILSEQ: 145 case -EPROTO: 146 case -ETIME: 147 return; 148 default: --- 379 unchanged lines hidden --- |