diff options
Diffstat (limited to 'drivers/media/video/bt8xx/bttv-driver.c')
-rw-r--r-- | drivers/media/video/bt8xx/bttv-driver.c | 48 |
1 files changed, 7 insertions, 41 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index 0902ec041c7a..849cd170b821 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c | |||
@@ -55,7 +55,7 @@ | |||
55 | #include <asm/io.h> | 55 | #include <asm/io.h> |
56 | #include <asm/byteorder.h> | 56 | #include <asm/byteorder.h> |
57 | 57 | ||
58 | #include <media/rds.h> | 58 | #include <media/saa6588.h> |
59 | 59 | ||
60 | 60 | ||
61 | unsigned int bttv_num; /* number of Bt848s in use */ | 61 | unsigned int bttv_num; /* number of Bt848s in use */ |
@@ -2597,31 +2597,6 @@ static int bttv_s_fmt_vid_overlay(struct file *file, void *priv, | |||
2597 | return setup_window_lock(fh, btv, &f->fmt.win, 1); | 2597 | return setup_window_lock(fh, btv, &f->fmt.win, 1); |
2598 | } | 2598 | } |
2599 | 2599 | ||
2600 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
2601 | static int vidiocgmbuf(struct file *file, void *priv, struct video_mbuf *mbuf) | ||
2602 | { | ||
2603 | int retval; | ||
2604 | unsigned int i; | ||
2605 | struct bttv_fh *fh = priv; | ||
2606 | |||
2607 | retval = __videobuf_mmap_setup(&fh->cap, gbuffers, gbufsize, | ||
2608 | V4L2_MEMORY_MMAP); | ||
2609 | if (retval < 0) { | ||
2610 | return retval; | ||
2611 | } | ||
2612 | |||
2613 | gbuffers = retval; | ||
2614 | memset(mbuf, 0, sizeof(*mbuf)); | ||
2615 | mbuf->frames = gbuffers; | ||
2616 | mbuf->size = gbuffers * gbufsize; | ||
2617 | |||
2618 | for (i = 0; i < gbuffers; i++) | ||
2619 | mbuf->offsets[i] = i * gbufsize; | ||
2620 | |||
2621 | return 0; | ||
2622 | } | ||
2623 | #endif | ||
2624 | |||
2625 | static int bttv_querycap(struct file *file, void *priv, | 2600 | static int bttv_querycap(struct file *file, void *priv, |
2626 | struct v4l2_capability *cap) | 2601 | struct v4l2_capability *cap) |
2627 | { | 2602 | { |
@@ -3354,9 +3329,6 @@ static const struct v4l2_ioctl_ops bttv_ioctl_ops = { | |||
3354 | .vidioc_streamoff = bttv_streamoff, | 3329 | .vidioc_streamoff = bttv_streamoff, |
3355 | .vidioc_g_tuner = bttv_g_tuner, | 3330 | .vidioc_g_tuner = bttv_g_tuner, |
3356 | .vidioc_s_tuner = bttv_s_tuner, | 3331 | .vidioc_s_tuner = bttv_s_tuner, |
3357 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
3358 | .vidiocgmbuf = vidiocgmbuf, | ||
3359 | #endif | ||
3360 | .vidioc_g_crop = bttv_g_crop, | 3332 | .vidioc_g_crop = bttv_g_crop, |
3361 | .vidioc_s_crop = bttv_s_crop, | 3333 | .vidioc_s_crop = bttv_s_crop, |
3362 | .vidioc_g_fbuf = bttv_g_fbuf, | 3334 | .vidioc_g_fbuf = bttv_g_fbuf, |
@@ -3416,7 +3388,7 @@ static int radio_release(struct file *file) | |||
3416 | { | 3388 | { |
3417 | struct bttv_fh *fh = file->private_data; | 3389 | struct bttv_fh *fh = file->private_data; |
3418 | struct bttv *btv = fh->btv; | 3390 | struct bttv *btv = fh->btv; |
3419 | struct rds_command cmd; | 3391 | struct saa6588_command cmd; |
3420 | 3392 | ||
3421 | v4l2_prio_close(&btv->prio, fh->prio); | 3393 | v4l2_prio_close(&btv->prio, fh->prio); |
3422 | file->private_data = NULL; | 3394 | file->private_data = NULL; |
@@ -3424,7 +3396,7 @@ static int radio_release(struct file *file) | |||
3424 | 3396 | ||
3425 | btv->radio_user--; | 3397 | btv->radio_user--; |
3426 | 3398 | ||
3427 | bttv_call_all(btv, core, ioctl, RDS_CMD_CLOSE, &cmd); | 3399 | bttv_call_all(btv, core, ioctl, SAA6588_CMD_CLOSE, &cmd); |
3428 | 3400 | ||
3429 | return 0; | 3401 | return 0; |
3430 | } | 3402 | } |
@@ -3551,13 +3523,13 @@ static ssize_t radio_read(struct file *file, char __user *data, | |||
3551 | { | 3523 | { |
3552 | struct bttv_fh *fh = file->private_data; | 3524 | struct bttv_fh *fh = file->private_data; |
3553 | struct bttv *btv = fh->btv; | 3525 | struct bttv *btv = fh->btv; |
3554 | struct rds_command cmd; | 3526 | struct saa6588_command cmd; |
3555 | cmd.block_count = count/3; | 3527 | cmd.block_count = count/3; |
3556 | cmd.buffer = data; | 3528 | cmd.buffer = data; |
3557 | cmd.instance = file; | 3529 | cmd.instance = file; |
3558 | cmd.result = -ENODEV; | 3530 | cmd.result = -ENODEV; |
3559 | 3531 | ||
3560 | bttv_call_all(btv, core, ioctl, RDS_CMD_READ, &cmd); | 3532 | bttv_call_all(btv, core, ioctl, SAA6588_CMD_READ, &cmd); |
3561 | 3533 | ||
3562 | return cmd.result; | 3534 | return cmd.result; |
3563 | } | 3535 | } |
@@ -3566,11 +3538,11 @@ static unsigned int radio_poll(struct file *file, poll_table *wait) | |||
3566 | { | 3538 | { |
3567 | struct bttv_fh *fh = file->private_data; | 3539 | struct bttv_fh *fh = file->private_data; |
3568 | struct bttv *btv = fh->btv; | 3540 | struct bttv *btv = fh->btv; |
3569 | struct rds_command cmd; | 3541 | struct saa6588_command cmd; |
3570 | cmd.instance = file; | 3542 | cmd.instance = file; |
3571 | cmd.event_list = wait; | 3543 | cmd.event_list = wait; |
3572 | cmd.result = -ENODEV; | 3544 | cmd.result = -ENODEV; |
3573 | bttv_call_all(btv, core, ioctl, RDS_CMD_POLL, &cmd); | 3545 | bttv_call_all(btv, core, ioctl, SAA6588_CMD_POLL, &cmd); |
3574 | 3546 | ||
3575 | return cmd.result; | 3547 | return cmd.result; |
3576 | } | 3548 | } |
@@ -4041,9 +4013,6 @@ static irqreturn_t bttv_irq(int irq, void *dev_id) | |||
4041 | 4013 | ||
4042 | btv=(struct bttv *)dev_id; | 4014 | btv=(struct bttv *)dev_id; |
4043 | 4015 | ||
4044 | if (btv->custom_irq) | ||
4045 | handled = btv->custom_irq(btv); | ||
4046 | |||
4047 | count=0; | 4016 | count=0; |
4048 | while (1) { | 4017 | while (1) { |
4049 | /* get/clear interrupt status bits */ | 4018 | /* get/clear interrupt status bits */ |
@@ -4079,7 +4048,6 @@ static irqreturn_t bttv_irq(int irq, void *dev_id) | |||
4079 | btv->field_count++; | 4048 | btv->field_count++; |
4080 | 4049 | ||
4081 | if ((astat & BT848_INT_GPINT) && btv->remote) { | 4050 | if ((astat & BT848_INT_GPINT) && btv->remote) { |
4082 | wake_up(&btv->gpioq); | ||
4083 | bttv_input_irq(btv); | 4051 | bttv_input_irq(btv); |
4084 | } | 4052 | } |
4085 | 4053 | ||
@@ -4284,7 +4252,6 @@ static int __devinit bttv_probe(struct pci_dev *dev, | |||
4284 | mutex_init(&btv->lock); | 4252 | mutex_init(&btv->lock); |
4285 | spin_lock_init(&btv->s_lock); | 4253 | spin_lock_init(&btv->s_lock); |
4286 | spin_lock_init(&btv->gpio_lock); | 4254 | spin_lock_init(&btv->gpio_lock); |
4287 | init_waitqueue_head(&btv->gpioq); | ||
4288 | init_waitqueue_head(&btv->i2c_queue); | 4255 | init_waitqueue_head(&btv->i2c_queue); |
4289 | INIT_LIST_HEAD(&btv->c.subs); | 4256 | INIT_LIST_HEAD(&btv->c.subs); |
4290 | INIT_LIST_HEAD(&btv->capture); | 4257 | INIT_LIST_HEAD(&btv->capture); |
@@ -4472,7 +4439,6 @@ static void __devexit bttv_remove(struct pci_dev *pci_dev) | |||
4472 | 4439 | ||
4473 | /* tell gpio modules we are leaving ... */ | 4440 | /* tell gpio modules we are leaving ... */ |
4474 | btv->shutdown=1; | 4441 | btv->shutdown=1; |
4475 | wake_up(&btv->gpioq); | ||
4476 | bttv_input_fini(btv); | 4442 | bttv_input_fini(btv); |
4477 | bttv_sub_del_devices(&btv->c); | 4443 | bttv_sub_del_devices(&btv->c); |
4478 | 4444 | ||