diff options
author | Patrick Boettcher <pb@linuxtv.org> | 2006-08-15 16:39:50 +0200 |
---|---|---|
committer | Patrick Boettcher <pb@linuxtv.org> | 2006-08-15 16:39:50 +0200 |
commit | 8ab83d48dae5d54d59e02e8c0087580aba1d6842 (patch) | |
tree | 69ebd72b8dd561af9b5af0f650fc0cb25a55326f /linux/drivers/media/video/bt8xx | |
parent | 04e963dbabd077673fbc46b533246190aebb95b5 (diff) | |
parent | af1f59fa1dacf231cf12ff92ee3a50e0a43c47bf (diff) | |
download | mediapointer-dvb-s2-8ab83d48dae5d54d59e02e8c0087580aba1d6842.tar.gz mediapointer-dvb-s2-8ab83d48dae5d54d59e02e8c0087580aba1d6842.tar.bz2 |
merge from main
From: Patrick Boettcher <pb@linuxtv.org>
merge from main
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/video/bt8xx')
-rw-r--r-- | linux/drivers/media/video/bt8xx/bttv-driver.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/linux/drivers/media/video/bt8xx/bttv-driver.c b/linux/drivers/media/video/bt8xx/bttv-driver.c index 7f75861b0..f2924c532 100644 --- a/linux/drivers/media/video/bt8xx/bttv-driver.c +++ b/linux/drivers/media/video/bt8xx/bttv-driver.c @@ -2456,6 +2456,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: @@ -4227,6 +4235,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); @@ -4319,6 +4328,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, @@ -4339,8 +4349,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) |