|
@@ -92,7 +92,6 @@ static int as102_usb_xfer_cmd(struct as10x_bus_adapter_t *bus_adap,
|
|
unsigned char *recv_buf, int recv_buf_len)
|
|
unsigned char *recv_buf, int recv_buf_len)
|
|
{
|
|
{
|
|
int ret = 0;
|
|
int ret = 0;
|
|
- ENTER();
|
|
|
|
|
|
|
|
if (send_buf != NULL) {
|
|
if (send_buf != NULL) {
|
|
ret = usb_control_msg(bus_adap->usb_dev,
|
|
ret = usb_control_msg(bus_adap->usb_dev,
|
|
@@ -140,7 +139,6 @@ static int as102_usb_xfer_cmd(struct as10x_bus_adapter_t *bus_adap,
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|
|
|
|
|
|
- LEAVE();
|
|
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -240,8 +238,6 @@ static void as102_free_usb_stream_buffer(struct as102_dev_t *dev)
|
|
{
|
|
{
|
|
int i;
|
|
int i;
|
|
|
|
|
|
- ENTER();
|
|
|
|
-
|
|
|
|
for (i = 0; i < MAX_STREAM_URB; i++)
|
|
for (i = 0; i < MAX_STREAM_URB; i++)
|
|
usb_free_urb(dev->stream_urb[i]);
|
|
usb_free_urb(dev->stream_urb[i]);
|
|
|
|
|
|
@@ -249,15 +245,12 @@ static void as102_free_usb_stream_buffer(struct as102_dev_t *dev)
|
|
MAX_STREAM_URB * AS102_USB_BUF_SIZE,
|
|
MAX_STREAM_URB * AS102_USB_BUF_SIZE,
|
|
dev->stream,
|
|
dev->stream,
|
|
dev->dma_addr);
|
|
dev->dma_addr);
|
|
- LEAVE();
|
|
|
|
}
|
|
}
|
|
|
|
|
|
static int as102_alloc_usb_stream_buffer(struct as102_dev_t *dev)
|
|
static int as102_alloc_usb_stream_buffer(struct as102_dev_t *dev)
|
|
{
|
|
{
|
|
int i, ret = 0;
|
|
int i, ret = 0;
|
|
|
|
|
|
- ENTER();
|
|
|
|
-
|
|
|
|
dev->stream = usb_alloc_coherent(dev->bus_adap.usb_dev,
|
|
dev->stream = usb_alloc_coherent(dev->bus_adap.usb_dev,
|
|
MAX_STREAM_URB * AS102_USB_BUF_SIZE,
|
|
MAX_STREAM_URB * AS102_USB_BUF_SIZE,
|
|
GFP_KERNEL,
|
|
GFP_KERNEL,
|
|
@@ -287,7 +280,6 @@ static int as102_alloc_usb_stream_buffer(struct as102_dev_t *dev)
|
|
|
|
|
|
dev->stream_urb[i] = urb;
|
|
dev->stream_urb[i] = urb;
|
|
}
|
|
}
|
|
- LEAVE();
|
|
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -318,23 +310,17 @@ static void as102_usb_release(struct kref *kref)
|
|
{
|
|
{
|
|
struct as102_dev_t *as102_dev;
|
|
struct as102_dev_t *as102_dev;
|
|
|
|
|
|
- ENTER();
|
|
|
|
-
|
|
|
|
as102_dev = container_of(kref, struct as102_dev_t, kref);
|
|
as102_dev = container_of(kref, struct as102_dev_t, kref);
|
|
if (as102_dev != NULL) {
|
|
if (as102_dev != NULL) {
|
|
usb_put_dev(as102_dev->bus_adap.usb_dev);
|
|
usb_put_dev(as102_dev->bus_adap.usb_dev);
|
|
kfree(as102_dev);
|
|
kfree(as102_dev);
|
|
}
|
|
}
|
|
-
|
|
|
|
- LEAVE();
|
|
|
|
}
|
|
}
|
|
|
|
|
|
static void as102_usb_disconnect(struct usb_interface *intf)
|
|
static void as102_usb_disconnect(struct usb_interface *intf)
|
|
{
|
|
{
|
|
struct as102_dev_t *as102_dev;
|
|
struct as102_dev_t *as102_dev;
|
|
|
|
|
|
- ENTER();
|
|
|
|
-
|
|
|
|
/* extract as102_dev_t from usb_device private data */
|
|
/* extract as102_dev_t from usb_device private data */
|
|
as102_dev = usb_get_intfdata(intf);
|
|
as102_dev = usb_get_intfdata(intf);
|
|
|
|
|
|
@@ -353,8 +339,6 @@ static void as102_usb_disconnect(struct usb_interface *intf)
|
|
kref_put(&as102_dev->kref, as102_usb_release);
|
|
kref_put(&as102_dev->kref, as102_usb_release);
|
|
|
|
|
|
pr_info("%s: device has been disconnected\n", DRIVER_NAME);
|
|
pr_info("%s: device has been disconnected\n", DRIVER_NAME);
|
|
-
|
|
|
|
- LEAVE();
|
|
|
|
}
|
|
}
|
|
|
|
|
|
static int as102_usb_probe(struct usb_interface *intf,
|
|
static int as102_usb_probe(struct usb_interface *intf,
|
|
@@ -364,8 +348,6 @@ static int as102_usb_probe(struct usb_interface *intf,
|
|
struct as102_dev_t *as102_dev;
|
|
struct as102_dev_t *as102_dev;
|
|
int i;
|
|
int i;
|
|
|
|
|
|
- ENTER();
|
|
|
|
-
|
|
|
|
/* This should never actually happen */
|
|
/* This should never actually happen */
|
|
if (ARRAY_SIZE(as102_usb_id_table) !=
|
|
if (ARRAY_SIZE(as102_usb_id_table) !=
|
|
(sizeof(as102_device_names) / sizeof(const char *))) {
|
|
(sizeof(as102_device_names) / sizeof(const char *))) {
|
|
@@ -424,7 +406,6 @@ static int as102_usb_probe(struct usb_interface *intf,
|
|
/* register dvb layer */
|
|
/* register dvb layer */
|
|
ret = as102_dvb_register(as102_dev);
|
|
ret = as102_dvb_register(as102_dev);
|
|
|
|
|
|
- LEAVE();
|
|
|
|
return ret;
|
|
return ret;
|
|
|
|
|
|
failed:
|
|
failed:
|
|
@@ -439,8 +420,6 @@ static int as102_open(struct inode *inode, struct file *file)
|
|
struct usb_interface *intf = NULL;
|
|
struct usb_interface *intf = NULL;
|
|
struct as102_dev_t *dev = NULL;
|
|
struct as102_dev_t *dev = NULL;
|
|
|
|
|
|
- ENTER();
|
|
|
|
-
|
|
|
|
/* read minor from inode */
|
|
/* read minor from inode */
|
|
minor = iminor(inode);
|
|
minor = iminor(inode);
|
|
|
|
|
|
@@ -467,7 +446,6 @@ static int as102_open(struct inode *inode, struct file *file)
|
|
kref_get(&dev->kref);
|
|
kref_get(&dev->kref);
|
|
|
|
|
|
exit:
|
|
exit:
|
|
- LEAVE();
|
|
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -476,15 +454,12 @@ static int as102_release(struct inode *inode, struct file *file)
|
|
int ret = 0;
|
|
int ret = 0;
|
|
struct as102_dev_t *dev = NULL;
|
|
struct as102_dev_t *dev = NULL;
|
|
|
|
|
|
- ENTER();
|
|
|
|
-
|
|
|
|
dev = file->private_data;
|
|
dev = file->private_data;
|
|
if (dev != NULL) {
|
|
if (dev != NULL) {
|
|
/* decrement the count on our device */
|
|
/* decrement the count on our device */
|
|
kref_put(&dev->kref, as102_usb_release);
|
|
kref_put(&dev->kref, as102_usb_release);
|
|
}
|
|
}
|
|
|
|
|
|
- LEAVE();
|
|
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|