From: Pradheep <pradheep.sh@xxxxxxxxx> The patch fixes the checkpatch.pl errors , braces , whitespaces and usleep Signed-off-by: pradheep.sh@xxxxxxxxx --- drivers/staging/go7007/go7007-usb.c | 2 +- drivers/staging/go7007/go7007-v4l2.c | 2 +- drivers/staging/go7007/s2250-board.c | 3 +- drivers/staging/go7007/s2250-loader.c | 6 ++-- drivers/staging/go7007/saa7134-go7007.c | 34 ++++++++++++++++-------------- drivers/staging/go7007/wis-ov7640.c | 3 +- drivers/staging/go7007/wis-saa7113.c | 3 +- drivers/staging/go7007/wis-saa7115.c | 3 +- drivers/staging/go7007/wis-tw2804.c | 6 +--- drivers/staging/go7007/wis-tw9903.c | 6 ++-- 10 files changed, 32 insertions(+), 36 deletions(-) diff --git a/drivers/staging/go7007/go7007-usb.c b/drivers/staging/go7007/go7007-usb.c index 3db3b0a..22b78b6 100644 --- a/drivers/staging/go7007/go7007-usb.c +++ b/drivers/staging/go7007/go7007-usb.c @@ -632,7 +632,7 @@ static int go7007_usb_ezusb_write_interrupt(struct go7007 *go, __le16_to_cpus(&status_reg); if (!(status_reg & 0x0010)) break; - msleep(10); + udelay(10000); } if (i == 100) { printk(KERN_ERR diff --git a/drivers/staging/go7007/go7007-v4l2.c b/drivers/staging/go7007/go7007-v4l2.c index 2b27d8d..fcb701b 100644 --- a/drivers/staging/go7007/go7007-v4l2.c +++ b/drivers/staging/go7007/go7007-v4l2.c @@ -606,7 +606,7 @@ static int vidioc_querycap(struct file *file, void *priv, strlcpy(cap->driver, "go7007", sizeof(cap->driver)); strlcpy(cap->card, go->name, sizeof(cap->card)); #if 0 - strlcpy(cap->bus_info, dev_name(&dev->udev->dev), sizeof(cap->bus_info)); +strlcpy(cap->bus_info, dev_name(&dev->udev->dev), sizeof(cap->bus_info)); #endif cap->version = KERNEL_VERSION(0, 9, 8); diff --git a/drivers/staging/go7007/s2250-board.c b/drivers/staging/go7007/s2250-board.c index e7736a9..385d391 100644 --- a/drivers/staging/go7007/s2250-board.c +++ b/drivers/staging/go7007/s2250-board.c @@ -103,8 +103,7 @@ static u16 vid_regs_fp[] = { }; /* PAL specific values */ -static u16 vid_regs_fp_pal[] = -{ +static u16 vid_regs_fp_pal[] = { 0x120, 0x017, 0x121, 0xd22, 0x122, 0x122, diff --git a/drivers/staging/go7007/s2250-loader.c b/drivers/staging/go7007/s2250-loader.c index 4e13251..e31b523 100644 --- a/drivers/staging/go7007/s2250-loader.c +++ b/drivers/staging/go7007/s2250-loader.c @@ -25,9 +25,9 @@ #define S2250_FIRMWARE "s2250.fw" typedef struct device_extension_s { - struct kref kref; - int minor; - struct usb_device *usbdev; + struct kref kref; + int minor; + struct usb_device *usbdev; } device_extension_t, *pdevice_extension_t; #define USB_s2250loader_MAJOR 240 diff --git a/drivers/staging/go7007/saa7134-go7007.c b/drivers/staging/go7007/saa7134-go7007.c index cf7c34a..26b9272 100644 --- a/drivers/staging/go7007/saa7134-go7007.c +++ b/drivers/staging/go7007/saa7134-go7007.c @@ -65,20 +65,20 @@ struct saa7134_go7007 { }; static struct go7007_board_info board_voyager = { - .firmware = "go7007tv.bin", - .flags = 0, - .sensor_flags = GO7007_SENSOR_656 | + .firmware = "go7007tv.bin", + .flags = 0, + .sensor_flags = GO7007_SENSOR_656 | GO7007_SENSOR_VALID_ENABLE | GO7007_SENSOR_TV | GO7007_SENSOR_VBI, .audio_flags = GO7007_AUDIO_I2S_MODE_1 | GO7007_AUDIO_WORD_16, - .audio_rate = 48000, - .audio_bclk_div = 8, - .audio_main_div = 2, - .hpi_buffer_cap = 7, - .num_inputs = 1, - .inputs = { + .audio_rate = 48000, + .audio_bclk_div = 8, + .audio_main_div = 2, + .hpi_buffer_cap = 7, + .num_inputs = 1, + .inputs = { { .name = "SAA7134", }, @@ -152,16 +152,17 @@ static int saa7134_go7007_interface_reset(struct go7007 *go) saa_writeb(SAA7134_GPIO_GPSTATUS2, GPIO_COMMAND_REQ1); saa_writeb(SAA7134_GPIO_GPSTATUS2, GPIO_COMMAND_RESET); - msleep(1); + udelay(1000); saa_writeb(SAA7134_GPIO_GPSTATUS2, GPIO_COMMAND_REQ1); saa_writeb(SAA7134_GPIO_GPSTATUS2, GPIO_COMMAND_REQ2); - msleep(10); + udelay(1000); saa_clearb(SAA7134_GPIO_GPMODE3, SAA7134_GPIO_GPRESCAN); saa_setb(SAA7134_GPIO_GPMODE3, SAA7134_GPIO_GPRESCAN); status = saa_readb(SAA7134_GPIO_GPSTATUS2); - /*printk(KERN_DEBUG "status is %s\n", status & 0x40 ? "OK" : "not OK"); */ + /*printk(KERN_DEBUG "status is %s\n", + status & 0x40 ? "OK" : "not OK"); */ /* enter command mode...(?) */ saa_writeb(SAA7134_GPIO_GPSTATUS2, GPIO_COMMAND_REQ1); @@ -171,7 +172,8 @@ static int saa7134_go7007_interface_reset(struct go7007 *go) saa_clearb(SAA7134_GPIO_GPMODE3, SAA7134_GPIO_GPRESCAN); saa_setb(SAA7134_GPIO_GPMODE3, SAA7134_GPIO_GPRESCAN); status = saa_readb(SAA7134_GPIO_GPSTATUS2); - /*printk(KERN_INFO "gpio is %08x\n", saa_readl(SAA7134_GPIO_GPSTATUS0 >> 2)); */ + /*printk(KERN_INFO "gpio is %08x\n", + saa_readl(SAA7134_GPIO_GPSTATUS0 >> 2)); */ } while (--count > 0); /* Wait for an interrupt to indicate successful hardware reset */ @@ -200,7 +202,7 @@ static int saa7134_go7007_write_interrupt(struct go7007 *go, int addr, int data) gpio_read(dev, HPI_ADDR_INTR_STATUS, &status_reg); if (!(status_reg & 0x0010)) break; - msleep(10); + usleep(10000); } if (i == 100) { printk(KERN_ERR @@ -243,12 +245,12 @@ static void saa7134_go7007_irq_ts_done(struct saa7134_dev *dev, (status >> 16) & 0x0f); if (status & 0x100000) { dma_sync_single_for_cpu(&dev->pci->dev, - saa->bottom_dma, PAGE_SIZE, DMA_FROM_DEVICE); + saa->bottom_dma, PAGE_SIZE, DMA_FROM_DEVICE); go7007_parse_video_stream(go, saa->bottom, PAGE_SIZE); saa_writel(SAA7134_RS_BA2(5), cpu_to_le32(saa->bottom_dma)); } else { dma_sync_single_for_cpu(&dev->pci->dev, - saa->top_dma, PAGE_SIZE, DMA_FROM_DEVICE); + saa->top_dma, PAGE_SIZE, DMA_FROM_DEVICE); go7007_parse_video_stream(go, saa->top, PAGE_SIZE); saa_writel(SAA7134_RS_BA1(5), cpu_to_le32(saa->top_dma)); } diff --git a/drivers/staging/go7007/wis-ov7640.c b/drivers/staging/go7007/wis-ov7640.c index 6bc9470..eb5efc9 100644 --- a/drivers/staging/go7007/wis-ov7640.c +++ b/drivers/staging/go7007/wis-ov7640.c @@ -29,8 +29,7 @@ struct wis_ov7640 { int hue; }; -static u8 initial_registers[] = -{ +static u8 initial_registers[] = { 0x12, 0x80, 0x12, 0x54, 0x14, 0x24, diff --git a/drivers/staging/go7007/wis-saa7113.c b/drivers/staging/go7007/wis-saa7113.c index 05e0e10..7f155cb 100644 --- a/drivers/staging/go7007/wis-saa7113.c +++ b/drivers/staging/go7007/wis-saa7113.c @@ -32,8 +32,7 @@ struct wis_saa7113 { int hue; }; -static u8 initial_registers[] = -{ +static u8 initial_registers[] = { 0x01, 0x08, 0x02, 0xc0, 0x03, 0x33, diff --git a/drivers/staging/go7007/wis-saa7115.c b/drivers/staging/go7007/wis-saa7115.c index 46cff59..b31a82b 100644 --- a/drivers/staging/go7007/wis-saa7115.c +++ b/drivers/staging/go7007/wis-saa7115.c @@ -32,8 +32,7 @@ struct wis_saa7115 { int hue; }; -static u8 initial_registers[] = -{ +static u8 initial_registers[] = { 0x01, 0x08, 0x02, 0xc0, 0x03, 0x20, diff --git a/drivers/staging/go7007/wis-tw2804.c b/drivers/staging/go7007/wis-tw2804.c index 5b218c5..9134f03 100644 --- a/drivers/staging/go7007/wis-tw2804.c +++ b/drivers/staging/go7007/wis-tw2804.c @@ -33,8 +33,7 @@ struct wis_tw2804 { int hue; }; -static u8 global_registers[] = -{ +static u8 global_registers[] = { 0x39, 0x00, 0x3a, 0xff, 0x3b, 0x84, @@ -45,8 +44,7 @@ static u8 global_registers[] = 0xff, 0xff, /* Terminator (reg 0xff does not exist) */ }; -static u8 channel_registers[] = -{ +static u8 channel_registers[] = { 0x01, 0xc4, 0x02, 0xa5, 0x03, 0x20, diff --git a/drivers/staging/go7007/wis-tw9903.c b/drivers/staging/go7007/wis-tw9903.c index 9230f4a..1ed66ba 100644 --- a/drivers/staging/go7007/wis-tw9903.c +++ b/drivers/staging/go7007/wis-tw9903.c @@ -31,8 +31,7 @@ struct wis_tw9903 { int hue; }; -static u8 initial_registers[] = -{ +static u8 initial_registers[] = { 0x02, 0x44, /* input 1, composite */ 0x03, 0x92, /* correct digital format */ 0x04, 0x00, @@ -118,7 +117,8 @@ static int wis_tw9903_command(struct i2c_client *client, { struct video_decoder_resolution *res = arg; /*int hscale = 256 * 720 / res->width;*/ - int hscale = 256 * 720 / (res->width - (res->width > 704 ? 0 : 8)); + int hscale = 256 * 720 + /(res->width - (res->width > 704 ? 0 : 8)); int vscale = 256 * (dec->norm & V4L2_STD_NTSC ? 240 : 288) / res->height; u8 regs[] = { -- 1.7.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel