diff options
Diffstat (limited to 'drivers/media/video/bt8xx/bttv-driver.c')
-rw-r--r-- | drivers/media/video/bt8xx/bttv-driver.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index 20dff7c316eb..50dde82844ec 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, | |||
2431 | fbuf->bytesperline = btv->fbuf.fmt.bytesperline; | 2431 | fbuf->bytesperline = btv->fbuf.fmt.bytesperline; |
2432 | if (fh->ovfmt) | 2432 | if (fh->ovfmt) |
2433 | fbuf->depth = fh->ovfmt->depth; | 2433 | fbuf->depth = fh->ovfmt->depth; |
2434 | else { | ||
2435 | if (fbuf->width) | ||
2436 | fbuf->depth = ((fbuf->bytesperline<<3) | ||
2437 | + (fbuf->width-1) ) | ||
2438 | /fbuf->width; | ||
2439 | else | ||
2440 | fbuf->depth = 0; | ||
2441 | } | ||
2434 | return 0; | 2442 | return 0; |
2435 | } | 2443 | } |
2436 | case VIDIOCSFBUF: | 2444 | case VIDIOCSFBUF: |
@@ -4186,6 +4194,7 @@ static void __devexit bttv_remove(struct pci_dev *pci_dev) | |||
4186 | return; | 4194 | return; |
4187 | } | 4195 | } |
4188 | 4196 | ||
4197 | #ifdef CONFIG_PM | ||
4189 | static int bttv_suspend(struct pci_dev *pci_dev, pm_message_t state) | 4198 | static int bttv_suspend(struct pci_dev *pci_dev, pm_message_t state) |
4190 | { | 4199 | { |
4191 | struct bttv *btv = pci_get_drvdata(pci_dev); | 4200 | struct bttv *btv = pci_get_drvdata(pci_dev); |
@@ -4266,6 +4275,7 @@ static int bttv_resume(struct pci_dev *pci_dev) | |||
4266 | spin_unlock_irqrestore(&btv->s_lock,flags); | 4275 | spin_unlock_irqrestore(&btv->s_lock,flags); |
4267 | return 0; | 4276 | return 0; |
4268 | } | 4277 | } |
4278 | #endif | ||
4269 | 4279 | ||
4270 | static struct pci_device_id bttv_pci_tbl[] = { | 4280 | static struct pci_device_id bttv_pci_tbl[] = { |
4271 | {PCI_VENDOR_ID_BROOKTREE, PCI_DEVICE_ID_BT848, | 4281 | {PCI_VENDOR_ID_BROOKTREE, PCI_DEVICE_ID_BT848, |
@@ -4286,8 +4296,10 @@ static struct pci_driver bttv_pci_driver = { | |||
4286 | .id_table = bttv_pci_tbl, | 4296 | .id_table = bttv_pci_tbl, |
4287 | .probe = bttv_probe, | 4297 | .probe = bttv_probe, |
4288 | .remove = __devexit_p(bttv_remove), | 4298 | .remove = __devexit_p(bttv_remove), |
4299 | #ifdef CONFIG_PM | ||
4289 | .suspend = bttv_suspend, | 4300 | .suspend = bttv_suspend, |
4290 | .resume = bttv_resume, | 4301 | .resume = bttv_resume, |
4302 | #endif | ||
4291 | }; | 4303 | }; |
4292 | 4304 | ||
4293 | static int bttv_init_module(void) | 4305 | static int bttv_init_module(void) |