Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6a540254966f8a01de0f7c78a27db17458c2d8f5
Commit:     6a540254966f8a01de0f7c78a27db17458c2d8f5
Parent:     ea2562d94fade3d6ee9b22ed5addbbdba697d22a
Author:     Mike Isely <[EMAIL PROTECTED]>
AuthorDate: Sun Dec 2 23:51:34 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 19:03:06 2008 -0200

    V4L/DVB (6705): pvrusb2: Implement default standard selection based on 
device type
    
    This adds a default video standard setting to the pvr2_device_desc
    structure for describing device types.  With this change it is
    possible to set a reasonable default standard based on device type.
    
    Signed-off-by: Mike Isely <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/pvrusb2/pvrusb2-devattr.c |    3 +--
 drivers/media/video/pvrusb2/pvrusb2-devattr.h |    7 +++++++
 drivers/media/video/pvrusb2/pvrusb2-hdw.c     |    6 +++++-
 3 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/media/video/pvrusb2/pvrusb2-devattr.c 
b/drivers/media/video/pvrusb2/pvrusb2-devattr.c
index e4a311a..eed6457 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-devattr.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-devattr.c
@@ -29,9 +29,8 @@ pvr2_device_desc structures.
 
 #include "pvrusb2-devattr.h"
 #include <linux/usb.h>
-/* All this is needed in order to pull in tuner type ids... */
+/* This is needed in order to pull in tuner type ids... */
 #include <linux/i2c.h>
-#include <linux/videodev2.h>
 #include <media/tuner.h>
 
 /* Known major hardware variants, keyed from device ID */
diff --git a/drivers/media/video/pvrusb2/pvrusb2-devattr.h 
b/drivers/media/video/pvrusb2/pvrusb2-devattr.h
index b9517e1..830f279 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-devattr.h
+++ b/drivers/media/video/pvrusb2/pvrusb2-devattr.h
@@ -22,6 +22,7 @@
 #define __PVRUSB2_DEVATTR_H
 
 #include <linux/mod_devicetable.h>
+#include <linux/videodev2.h>
 
 /*
 
@@ -69,6 +70,12 @@ struct pvr2_device_desc {
           driver could not discover the type any other way). */
        int default_tuner_type;
 
+       /* Initial standard bits to use for this device, if not zero.
+          Anything set here is also implied as an available standard.
+          Note: This is ignored if overridden on the module load line via
+          the video_std module option. */
+       v4l2_std_id default_std_mask;
+
        /* If set, we don't bother trying to load cx23416 firmware. */
        char flag_skip_cx23416_firmware;
 
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c 
b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index a45721f..08b513b 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -1439,8 +1439,12 @@ static v4l2_std_id get_default_standard(struct pvr2_hdw 
*hdw)
        int tp = 0;
        if ((unit_number >= 0) && (unit_number < PVR_NUM)) {
                tp = video_std[unit_number];
+               if (tp) return tp;
        }
-       return tp;
+       if (hdw->hdw_desc->default_std_mask) {
+               return hdw->hdw_desc->default_std_mask;
+       }
+       return 0;
 }
 
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to