diff options
Diffstat (limited to 'linux/drivers/media/dvb/siano/smsusb.c')
-rw-r--r-- | linux/drivers/media/dvb/siano/smsusb.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/linux/drivers/media/dvb/siano/smsusb.c b/linux/drivers/media/dvb/siano/smsusb.c index 0c4776b4d..324444015 100644 --- a/linux/drivers/media/dvb/siano/smsusb.c +++ b/linux/drivers/media/dvb/siano/smsusb.c @@ -40,28 +40,26 @@ #define USB_PID_NOVA_B 0x0201 #define USB_PID_VEGA 0x0300 -typedef struct _smsusb_device smsusb_device_t; +struct smsusb_device_t; -typedef struct _smsusb_urb -{ - smscore_buffer_t *cb; - smsusb_device_t *dev; +struct smsusb_urb_t { + struct smscore_buffer_t *cb; + struct smsusb_device_t *dev; - struct urb urb; -} smsusb_urb_t; + struct urb urb; +}; -typedef struct _smsusb_device -{ +struct smsusb_device_t { struct usb_device *udev; - smscore_device_t *coredev; + struct smscore_device_t *coredev; - smsusb_urb_t surbs[MAX_URBS]; + struct smsusb_urb_t surbs[MAX_URBS]; int response_alignment; int buffer_size; -} *psmsusb_device_t; +}; -int smsusb_submit_urb(smsusb_device_t *dev, smsusb_urb_t *surb); +int smsusb_submit_urb(struct smsusb_device_t *dev, struct smsusb_urb_t *surb); #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) void smsusb_onresponse(struct urb *urb) @@ -69,8 +67,8 @@ void smsusb_onresponse(struct urb *urb) void smsusb_onresponse(struct urb *urb, struct pt_regs *regs) #endif { - smsusb_urb_t *surb = (smsusb_urb_t *) urb->context; - smsusb_device_t *dev = surb->dev; + struct smsusb_urb_t *surb = (struct smsusb_urb_t *) urb->context; + struct smsusb_device_t *dev = surb->dev; if (urb->status < 0) { printk(KERN_INFO "%s error, urb status %d, %d bytes\n", @@ -79,7 +77,7 @@ void smsusb_onresponse(struct urb *urb, struct pt_regs *regs) } if (urb->actual_length > 0) { - SmsMsgHdr_ST *phdr = (SmsMsgHdr_ST *) surb->cb->p; + struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *) surb->cb->p; if (urb->actual_length >= phdr->msgLength) { surb->cb->size = phdr->msgLength; @@ -106,7 +104,7 @@ void smsusb_onresponse(struct urb *urb, struct pt_regs *regs) /* move buffer pointer and * copy header to its new location */ memcpy((char *) phdr + surb->cb->offset, - phdr, sizeof(SmsMsgHdr_ST)); + phdr, sizeof(struct SmsMsgHdr_ST)); } else surb->cb->offset = 0; @@ -123,7 +121,7 @@ exit_and_resubmit: smsusb_submit_urb(dev, surb); } -int smsusb_submit_urb(smsusb_device_t *dev, smsusb_urb_t *surb) +int smsusb_submit_urb(struct smsusb_device_t *dev, struct smsusb_urb_t *surb) { if (!surb->cb) { surb->cb = smscore_getbuffer(dev->coredev); @@ -149,7 +147,7 @@ int smsusb_submit_urb(smsusb_device_t *dev, smsusb_urb_t *surb) return usb_submit_urb(&surb->urb, GFP_ATOMIC); } -void smsusb_stop_streaming(smsusb_device_t *dev) +void smsusb_stop_streaming(struct smsusb_device_t *dev) { int i; @@ -163,7 +161,7 @@ void smsusb_stop_streaming(smsusb_device_t *dev) } } -int smsusb_start_streaming(smsusb_device_t *dev) +int smsusb_start_streaming(struct smsusb_device_t *dev) { int i, rc; @@ -182,7 +180,7 @@ int smsusb_start_streaming(smsusb_device_t *dev) int smsusb_sendrequest(void *context, void *buffer, size_t size) { - smsusb_device_t *dev = (smsusb_device_t *) context; + struct smsusb_device_t *dev = (struct smsusb_device_t *) context; int dummy; return usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, 2), @@ -239,7 +237,8 @@ int smsusb1_load_firmware(struct usb_device *udev, int id) void smsusb1_detectmode(void *context, int *mode) { - char *product_string = ((smsusb_device_t *) context)->udev->product; + char *product_string = + ((struct smsusb_device_t *) context)->udev->product; *mode = DEVICE_MODE_NONE; @@ -260,8 +259,8 @@ void smsusb1_detectmode(void *context, int *mode) int smsusb1_setmode(void *context, int mode) { - SmsMsgHdr_ST Msg = { MSG_SW_RELOAD_REQ, 0, HIF_TASK, - sizeof(SmsMsgHdr_ST), 0 }; + struct SmsMsgHdr_ST Msg = { MSG_SW_RELOAD_REQ, 0, HIF_TASK, + sizeof(struct SmsMsgHdr_ST), 0 }; if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_DVBT_BDA) { printk(KERN_INFO "%s invalid firmware id specified %d\n", @@ -274,7 +273,8 @@ int smsusb1_setmode(void *context, int mode) void smsusb_term_device(struct usb_interface *intf) { - smsusb_device_t *dev = (smsusb_device_t *) usb_get_intfdata(intf); + struct smsusb_device_t *dev = + (struct smsusb_device_t *) usb_get_intfdata(intf); if (dev) { smsusb_stop_streaming(dev); @@ -293,15 +293,15 @@ void smsusb_term_device(struct usb_interface *intf) int smsusb_init_device(struct usb_interface *intf) { - smsdevice_params_t params; - smsusb_device_t *dev; + struct smsdevice_params_t params; + struct smsusb_device_t *dev; int i, rc; /* create device object */ - dev = kzalloc(sizeof(smsusb_device_t), GFP_KERNEL); + dev = kzalloc(sizeof(struct smsusb_device_t), GFP_KERNEL); if (!dev) { - printk(KERN_INFO "%s kzalloc(sizeof(smsusb_device_t) failed\n", - __func__); + printk(KERN_INFO "%s kzalloc(sizeof(struct smsusb_device_t) " + "failed\n", __func__); return -ENOMEM; } @@ -338,7 +338,7 @@ int smsusb_init_device(struct usb_interface *intf) dev->buffer_size = USB2_BUFFER_SIZE; dev->response_alignment = dev->udev->ep_in[1]->desc.wMaxPacketSize - - sizeof(SmsMsgHdr_ST); + sizeof(struct SmsMsgHdr_ST); params.flags |= SMS_DEVICE_FAMILY2; break; |