aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-hdw.c
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2006-12-27 21:12:28 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-02-21 10:34:24 -0500
commit8079384eeb1c490d0ad679cef061205e1b5a1c8a (patch)
treec2c53947dd456bcf668c6b4d62f664b49b0590f1 /drivers/media/video/pvrusb2/pvrusb2-hdw.c
parentfd5a75fe00ec13311289928c2cb17d8676f8db45 (diff)
V4L/DVB (5041): Pvrusb2: Use separate enumeration for get/store of minor number
Use separate enum for get/store of minor number; we want pvr2_config to go away eventually and since it really means something different, don't use it here 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-hdw.c')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-hdw.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 6acd73ca9ed3..39d04d8644a8 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -1898,7 +1898,8 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf,
1898 1898
1899 hdw->eeprom_addr = -1; 1899 hdw->eeprom_addr = -1;
1900 hdw->unit_number = -1; 1900 hdw->unit_number = -1;
1901 hdw->v4l_minor_number_mpeg = -1; 1901 hdw->v4l_minor_number_video = -1;
1902 hdw->v4l_minor_number_vbi = -1;
1902 hdw->v4l_minor_number_radio = -1; 1903 hdw->v4l_minor_number_radio = -1;
1903 hdw->ctl_write_buffer = kmalloc(PVR2_CTL_BUFFSIZE,GFP_KERNEL); 1904 hdw->ctl_write_buffer = kmalloc(PVR2_CTL_BUFFSIZE,GFP_KERNEL);
1904 if (!hdw->ctl_write_buffer) goto fail; 1905 if (!hdw->ctl_write_buffer) goto fail;
@@ -2548,11 +2549,12 @@ int pvr2_hdw_cpufw_get(struct pvr2_hdw *hdw,unsigned int offs,
2548 2549
2549 2550
2550int pvr2_hdw_v4l_get_minor_number(struct pvr2_hdw *hdw, 2551int pvr2_hdw_v4l_get_minor_number(struct pvr2_hdw *hdw,
2551 enum pvr2_config index) 2552 enum pvr2_v4l_type index)
2552{ 2553{
2553 switch (index) { 2554 switch (index) {
2554 case pvr2_config_mpeg: return hdw->v4l_minor_number_mpeg; 2555 case pvr2_v4l_type_video: return hdw->v4l_minor_number_video;
2555 case pvr2_config_radio: return hdw->v4l_minor_number_radio; 2556 case pvr2_v4l_type_vbi: return hdw->v4l_minor_number_vbi;
2557 case pvr2_v4l_type_radio: return hdw->v4l_minor_number_radio;
2556 default: return -1; 2558 default: return -1;
2557 } 2559 }
2558} 2560}
@@ -2560,11 +2562,12 @@ int pvr2_hdw_v4l_get_minor_number(struct pvr2_hdw *hdw,
2560 2562
2561/* Store a v4l minor device number */ 2563/* Store a v4l minor device number */
2562void pvr2_hdw_v4l_store_minor_number(struct pvr2_hdw *hdw, 2564void pvr2_hdw_v4l_store_minor_number(struct pvr2_hdw *hdw,
2563 enum pvr2_config index,int v) 2565 enum pvr2_v4l_type index,int v)
2564{ 2566{
2565 switch (index) { 2567 switch (index) {
2566 case pvr2_config_mpeg: hdw->v4l_minor_number_mpeg = v; 2568 case pvr2_v4l_type_video: hdw->v4l_minor_number_video = v;
2567 case pvr2_config_radio: hdw->v4l_minor_number_radio = v; 2569 case pvr2_v4l_type_vbi: hdw->v4l_minor_number_vbi = v;
2570 case pvr2_v4l_type_radio: hdw->v4l_minor_number_radio = v;
2568 default: break; 2571 default: break;
2569 } 2572 }
2570} 2573}