diff options
author | Steven Toth <stoth@hauppauge.com> | 2008-04-17 17:41:28 -0400 |
---|---|---|
committer | Steven Toth <stoth@hauppauge.com> | 2008-04-17 17:41:28 -0400 |
commit | 359d1d58bc15a93bcede273e981430f6a11aba11 (patch) | |
tree | 7832a4718621add10069864e44d65324e775fa92 /linux/drivers/media/video | |
parent | c66482edaa7064dafbf88c1dd33e7516fa45edcd (diff) | |
download | mediapointer-dvb-s2-359d1d58bc15a93bcede273e981430f6a11aba11.tar.gz mediapointer-dvb-s2-359d1d58bc15a93bcede273e981430f6a11aba11.tar.bz2 |
au0828: Cleanup
From: Steven Toth <stoth@hauppauge.com>
au0828: Cleanup
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/au0828/au0828-cards.c | 8 | ||||
-rw-r--r-- | linux/drivers/media/video/au0828/au0828-core.c | 31 | ||||
-rw-r--r-- | linux/drivers/media/video/au0828/au0828-dvb.c | 12 | ||||
-rw-r--r-- | linux/drivers/media/video/au0828/au0828-i2c.c | 10 | ||||
-rw-r--r-- | linux/drivers/media/video/au0828/au0828-reg.h | 3 | ||||
-rw-r--r-- | linux/drivers/media/video/au0828/au0828.h | 1 |
6 files changed, 21 insertions, 44 deletions
diff --git a/linux/drivers/media/video/au0828/au0828-cards.c b/linux/drivers/media/video/au0828/au0828-cards.c index 5c9c3aea9..f6c6228b6 100644 --- a/linux/drivers/media/video/au0828/au0828-cards.c +++ b/linux/drivers/media/video/au0828/au0828-cards.c @@ -51,7 +51,7 @@ int au0828_tuner_callback(void *priv, int command, int arg) case AU0828_BOARD_HAUPPAUGE_HVR850: case AU0828_BOARD_HAUPPAUGE_HVR950Q: case AU0828_BOARD_DVICO_FUSIONHDTV7: - if(command == 0) { + if (command == 0) { /* Tuner Reset Command from xc5000 */ /* Drive the tuner into reset and out */ au0828_clear(dev, REG_001, 2); @@ -78,8 +78,7 @@ static void hauppauge_eeprom(struct au0828_dev *dev, u8 *eeprom_data) tveeprom_hauppauge_analog(&dev->i2c_client, &tv, eeprom_data); /* Make sure we support the board model */ - switch (tv.model) - { + switch (tv.model) { case 72001: /* WinTV-HVR950q (Retail, IR, ATSC/QAM and basic analog video */ break; default: @@ -92,7 +91,6 @@ static void hauppauge_eeprom(struct au0828_dev *dev, u8 *eeprom_data) __func__, tv.model); } - void au0828_card_setup(struct au0828_dev *dev) { static u8 eeprom[256]; @@ -116,7 +114,7 @@ void au0828_card_setup(struct au0828_dev *dev) /* * The bridge has between 8 and 12 gpios. * Regs 1 and 0 deal with output enables. - * Regs 3 and 2 * deal with direction. + * Regs 3 and 2 deal with direction. */ void au0828_gpio_setup(struct au0828_dev *dev) { diff --git a/linux/drivers/media/video/au0828/au0828-core.c b/linux/drivers/media/video/au0828/au0828-core.c index e500e00d2..024bca881 100644 --- a/linux/drivers/media/video/au0828/au0828-core.c +++ b/linux/drivers/media/video/au0828/au0828-core.c @@ -146,26 +146,7 @@ static int recv_control_msg(struct au0828_dev *dev, u16 request, u32 value, mutex_unlock(&dev->mutex); return status; } -#if 0 -static void dump_urb(struct urb *urb) -{ - dprintk(2, "urb :%p\n", urb); - dprintk(2, "dev :%p\n", urb->dev); - dprintk(2, "pipe :%08x\n", urb->pipe); - dprintk(2, "status :%d\n", urb->status); - dprintk(2, "transfer_flags :%08x\n", urb->transfer_flags); - dprintk(2, "transfer_buffer :%p\n", urb->transfer_buffer); - dprintk(2, "transfer_buffer_length:%d\n", urb->transfer_buffer_length); - dprintk(2, "actual_length :%d\n", urb->actual_length); - dprintk(2, "setup_packet :%p\n", urb->setup_packet); - dprintk(2, "start_frame :%d\n", urb->start_frame); - dprintk(2, "number_of_packets :%d\n", urb->number_of_packets); - dprintk(2, "interval :%d\n", urb->interval); - dprintk(2, "error_count :%d\n", urb->error_count); - dprintk(2, "context :%p\n", urb->context); - dprintk(2, "complete :%p\n", urb->complete); -} -#endif + static void au0828_usb_disconnect(struct usb_interface *interface) { struct au0828_dev *dev = usb_get_intfdata(interface); @@ -200,7 +181,7 @@ static int au0828_usb_probe (struct usb_interface *interface, if (ifnum != 0) return -ENODEV; - dprintk(1,"%s() vendor id 0x%x device id 0x%x ifnum:%d\n", __func__, + dprintk(1, "%s() vendor id 0x%x device id 0x%x ifnum:%d\n", __func__, le16_to_cpu(usbdev->descriptor.idVendor), le16_to_cpu(usbdev->descriptor.idProduct), ifnum); @@ -254,20 +235,20 @@ static int __init au0828_init(void) { int ret; - if(debug) + if (debug) printk(KERN_INFO "%s() Debugging is enabled\n", __func__); - if(usb_debug) { + if (usb_debug) { printk(KERN_INFO "%s() USB Debugging is enabled\n", __func__); debug |= 2; } - if(i2c_debug) { + if (i2c_debug) { printk(KERN_INFO "%s() I2C Debugging is enabled\n", __func__); debug |= 4; } - if(bridge_debug) { + if (bridge_debug) { printk(KERN_INFO "%s() Bridge Debugging is enabled\n", __func__); debug |= 8; diff --git a/linux/drivers/media/video/au0828/au0828-dvb.c b/linux/drivers/media/video/au0828/au0828-dvb.c index b566fe7f2..4b4595fec 100644 --- a/linux/drivers/media/video/au0828/au0828-dvb.c +++ b/linux/drivers/media/video/au0828/au0828-dvb.c @@ -32,6 +32,9 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); +#define _AU0828_BULKPIPE 0x83 +#define _BULKPIPESIZE 0xe522 + static struct au8522_config hauppauge_hvr950q_config = { .demod_address = 0x8e >> 1, .status_mode = AU8522_DEMODLOCKING, @@ -71,7 +74,8 @@ static void urb_completion(struct urb *purb) ptr = (u8 *)purb->transfer_buffer; /* Feed the transport payload into the kernel demux */ - dvb_dmx_swfilter_packets(&dev->dvb.demux, purb->transfer_buffer, purb->actual_length / 188); + dvb_dmx_swfilter_packets(&dev->dvb.demux, + purb->transfer_buffer, purb->actual_length / 188); /* Clean the buffer before we requeue */ memset(purb->transfer_buffer, 0, URB_BUFSIZE); @@ -86,7 +90,6 @@ static int stop_urb_transfer(struct au0828_dev *dev) dprintk(2, "%s()\n", __func__); - /* FIXME: Do we need to free the transfer_buffers? */ for (i = 0; i < URB_COUNT; i++) { usb_kill_urb(dev->urbs[i]); kfree(dev->urbs[i]->transfer_buffer); @@ -98,9 +101,6 @@ static int stop_urb_transfer(struct au0828_dev *dev) return 0; } -#define _AU0828_BULKPIPE 0x83 -#define _BULKPIPESIZE 0xe522 - static int start_urb_transfer(struct au0828_dev *dev) { struct urb *purb; @@ -330,7 +330,7 @@ void au0828_dvb_unregister(struct au0828_dev *dev) dprintk(1, "%s()\n", __func__); - if(dvb->frontend == NULL) + if (dvb->frontend == NULL) return; dvb_net_release(&dvb->net); diff --git a/linux/drivers/media/video/au0828/au0828-i2c.c b/linux/drivers/media/video/au0828/au0828-i2c.c index 2d34ed05c..95e4e3b44 100644 --- a/linux/drivers/media/video/au0828/au0828-i2c.c +++ b/linux/drivers/media/video/au0828/au0828-i2c.c @@ -152,7 +152,7 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap, dprintk(4, "SEND: %02x\n", msg->addr); - for (i=0; i < msg->len;) { + for (i = 0; i < msg->len;) { dprintk(4, " %02x\n", msg->buf[i]); @@ -174,10 +174,6 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap, if (!i2c_wait_write_done(i2c_adap)) return -EIO; -#if 0 - if (!i2c_slave_did_write_ack(i2c_adap)) - return -EIO; -#endif } @@ -215,7 +211,7 @@ static int i2c_readbytes(struct i2c_adapter *i2c_adap, return 0; } - for (i=0; i < msg->len;) { + for (i = 0; i < msg->len;) { i++; @@ -246,7 +242,7 @@ static int i2c_xfer(struct i2c_adapter *i2c_adap, dprintk(4, "%s(num = %d)\n", __func__, num); - for (i = 0 ; i < num; i++) { + for (i = 0; i < num; i++) { dprintk(4, "%s(num = %d) addr = 0x%02x len = 0x%x\n", __func__, num, msgs[i].addr, msgs[i].len); if (msgs[i].flags & I2C_M_RD) { diff --git a/linux/drivers/media/video/au0828/au0828-reg.h b/linux/drivers/media/video/au0828/au0828-reg.h index c501f6a52..398275508 100644 --- a/linux/drivers/media/video/au0828/au0828-reg.h +++ b/linux/drivers/media/video/au0828/au0828-reg.h @@ -19,6 +19,9 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +/* We'll start to rename these registers once we have a better + * understanding of their meaning. + */ #define REG_000 0x000 #define REG_001 0x001 #define REG_002 0x002 diff --git a/linux/drivers/media/video/au0828/au0828.h b/linux/drivers/media/video/au0828/au0828.h index 3e0dbda0c..c004e00c0 100644 --- a/linux/drivers/media/video/au0828/au0828.h +++ b/linux/drivers/media/video/au0828/au0828.h @@ -37,7 +37,6 @@ #define DRIVER_NAME "au0828" #define URB_COUNT 16 -//#define URB_BUFSIZE (312 * 188) #define URB_BUFSIZE (0xe522) struct au0828_board { |