From 3702627899db1d6a818c6e0b4ba5205f94bfbef4 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 6 Aug 2006 09:10:06 -0300 Subject: V4L/DVB (4474): On some cases, depth were not returned. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/bt8xx/bttv-driver.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/media/video/bt8xx/bttv-driver.c') diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index 20dff7c316eb..3d7b97c661b9 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c @@ -2431,6 +2431,14 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file, fbuf->bytesperline = btv->fbuf.fmt.bytesperline; if (fh->ovfmt) fbuf->depth = fh->ovfmt->depth; + else { + if (fbuf->width) + fbuf->depth = ((fbuf->bytesperline<<3) + + (fbuf->width-1) ) + /fbuf->width; + else + fbuf->depth = 0; + } return 0; } case VIDIOCSFBUF: -- cgit v1.2.3 From a2b9e3e74a8edbc4a9d266cc54cd30266215fbdf Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Mon, 7 Aug 2006 20:01:01 -0300 Subject: V4L/DVB (4490): Whitespace cleanup from whitespace cleaning script Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/bt8xx/bttv-driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/media/video/bt8xx/bttv-driver.c') diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index 3d7b97c661b9..b2a0723af657 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c @@ -2434,8 +2434,8 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file, else { if (fbuf->width) fbuf->depth = ((fbuf->bytesperline<<3) - + (fbuf->width-1) ) - /fbuf->width; + + (fbuf->width-1) ) + /fbuf->width; else fbuf->depth = 0; } -- cgit v1.2.3 From 17bc98a41ae0ef82bab502ec1f9224ec5fcbe764 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Sat, 12 Aug 2006 22:01:27 -0300 Subject: V4L/DVB (4499): CONFIG_PM=n slim: drivers/media/video/* Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/bt8xx/bttv-driver.c | 4 ++++ drivers/media/video/cx88/cx88-blackbird.c | 2 ++ drivers/media/video/cx88/cx88-dvb.c | 2 ++ drivers/media/video/cx88/cx88-video.c | 7 ++++++- 4 files changed, 14 insertions(+), 1 deletion(-) (limited to 'drivers/media/video/bt8xx/bttv-driver.c') diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index b2a0723af657..50dde82844ec 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c @@ -4194,6 +4194,7 @@ static void __devexit bttv_remove(struct pci_dev *pci_dev) return; } +#ifdef CONFIG_PM static int bttv_suspend(struct pci_dev *pci_dev, pm_message_t state) { struct bttv *btv = pci_get_drvdata(pci_dev); @@ -4274,6 +4275,7 @@ static int bttv_resume(struct pci_dev *pci_dev) spin_unlock_irqrestore(&btv->s_lock,flags); return 0; } +#endif static struct pci_device_id bttv_pci_tbl[] = { {PCI_VENDOR_ID_BROOKTREE, PCI_DEVICE_ID_BT848, @@ -4294,8 +4296,10 @@ static struct pci_driver bttv_pci_driver = { .id_table = bttv_pci_tbl, .probe = bttv_probe, .remove = __devexit_p(bttv_remove), +#ifdef CONFIG_PM .suspend = bttv_suspend, .resume = bttv_resume, +#endif }; static int bttv_init_module(void) diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c index b60177f173c3..a7921f9d45d8 100644 --- a/drivers/media/video/cx88/cx88-blackbird.c +++ b/drivers/media/video/cx88/cx88-blackbird.c @@ -1160,8 +1160,10 @@ static struct pci_driver blackbird_pci_driver = { .id_table = cx8802_pci_tbl, .probe = blackbird_probe, .remove = __devexit_p(blackbird_remove), +#ifdef CONFIG_PM .suspend = cx8802_suspend_common, .resume = cx8802_resume_common, +#endif }; static int blackbird_init(void) diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index 0771acbed74d..a5812e2e25c1 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c @@ -870,8 +870,10 @@ static struct pci_driver dvb_pci_driver = { .id_table = cx8802_pci_tbl, .probe = dvb_probe, .remove = __devexit_p(dvb_remove), +#ifdef CONFIG_PM .suspend = cx8802_suspend_common, .resume = cx8802_resume_common, +#endif }; static int dvb_init(void) diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index 94c92bacc342..fbc79e9842aa 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c @@ -497,6 +497,7 @@ static int start_video_dma(struct cx8800_dev *dev, return 0; } +#ifdef CONFIG_PM static int stop_video_dma(struct cx8800_dev *dev) { struct cx88_core *core = dev->core; @@ -512,6 +513,7 @@ static int stop_video_dma(struct cx8800_dev *dev) cx_clear(MO_VID_INTMSK, 0x0f0011); return 0; } +#endif static int restart_video_queue(struct cx8800_dev *dev, struct cx88_dmaqueue *q) @@ -2017,6 +2019,7 @@ static void __devexit cx8800_finidev(struct pci_dev *pci_dev) kfree(dev); } +#ifdef CONFIG_PM static int cx8800_suspend(struct pci_dev *pci_dev, pm_message_t state) { struct cx8800_dev *dev = pci_get_drvdata(pci_dev); @@ -2092,6 +2095,7 @@ static int cx8800_resume(struct pci_dev *pci_dev) return 0; } +#endif /* ----------------------------------------------------------- */ @@ -2112,9 +2116,10 @@ static struct pci_driver cx8800_pci_driver = { .id_table = cx8800_pci_tbl, .probe = cx8800_initdev, .remove = __devexit_p(cx8800_finidev), - +#ifdef CONFIG_PM .suspend = cx8800_suspend, .resume = cx8800_resume, +#endif }; static int cx8800_init(void) -- cgit v1.2.3