diff options
author | Pantelis Koukousoulas <pakt223@freemail.gr> | 2006-12-27 21:07:58 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-02-21 10:34:22 -0500 |
commit | 2fdf3d9c94f7f752dacbebb75bbecda3c1b082a0 (patch) | |
tree | 24d9c155095a642806cb3fee4210843936f220fe /drivers/media/video/pvrusb2/pvrusb2-v4l2.c | |
parent | 6fcb5b3ef758ca78461d390dc07bed5a4667c521 (diff) |
V4L/DVB (5037): Pvrusb2: Implement multiple minor device number handling
This is the first patch in preparation of the V4L2/IVTV radio interface.
It does away with the assumption of only one minor per device. It also
adds a file to show the radio minor as well. This can be useful for a
program like pvr-radio.c (when it grows up), since this way it can search
for the minor of the /dev/radioX device it opened and use the video minor
of the same driver instance to get to the actual stream.
The implementation looks kinda ugly. Feel free to improve (that is the
reason behind separate patches anyway).
Signed-off-by: Pantelis Koukousoulas <pakt223@freemail.gr>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-v4l2.c')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-v4l2.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index 6cf17080eb49..02a541fbeff9 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c | |||
@@ -722,7 +722,12 @@ static void pvr2_v4l2_dev_destroy(struct pvr2_v4l2_dev *dip) | |||
722 | 722 | ||
723 | static void pvr2_v4l2_destroy_no_lock(struct pvr2_v4l2 *vp) | 723 | static void pvr2_v4l2_destroy_no_lock(struct pvr2_v4l2 *vp) |
724 | { | 724 | { |
725 | pvr2_hdw_v4l_store_minor_number(vp->channel.mc_head->hdw,-1); | 725 | pvr2_hdw_v4l_store_minor_number(vp->channel.mc_head->hdw, |
726 | pvr2_config_mpeg-1,-1); | ||
727 | pvr2_hdw_v4l_store_minor_number(vp->channel.mc_head->hdw, | ||
728 | pvr2_config_vbi-1,-1); | ||
729 | pvr2_hdw_v4l_store_minor_number(vp->channel.mc_head->hdw, | ||
730 | pvr2_config_radio-1,-1); | ||
726 | pvr2_v4l2_dev_destroy(vp->vdev); | 731 | pvr2_v4l2_dev_destroy(vp->vdev); |
727 | 732 | ||
728 | pvr2_trace(PVR2_TRACE_STRUCT,"Destroying pvr2_v4l2 id=%p",vp); | 733 | pvr2_trace(PVR2_TRACE_STRUCT,"Destroying pvr2_v4l2 id=%p",vp); |
@@ -1062,7 +1067,7 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip, | |||
1062 | } | 1067 | } |
1063 | 1068 | ||
1064 | pvr2_hdw_v4l_store_minor_number(vp->channel.mc_head->hdw, | 1069 | pvr2_hdw_v4l_store_minor_number(vp->channel.mc_head->hdw, |
1065 | dip->devbase.minor); | 1070 | cfg-1,dip->devbase.minor); |
1066 | } | 1071 | } |
1067 | 1072 | ||
1068 | 1073 | ||