This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/v4l-utils.git tree:

Subject: libv4lcontrol: Check control_flags before doing wildcard maching on 
upside_down
Author:  Hans de Goede <[email protected]>
Date:    Sun Mar 2 14:55:36 2014 +0100

Check the more specific control_flags table before doing wildcard maching on
entries in the upside_down table, and if there is a match in the control_flags
table skip the upside_down table.

This way the control flags table can be used to override false positives caused
by the upside_down table wildcard matching.

Signed-off-by: Hans de Goede <[email protected]>

 lib/libv4lconvert/control/libv4lcontrol.c |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)

---

http://git.linuxtv.org/v4l-utils.git?a=commitdiff;h=21b28ea5ae9df3448450f655343a29a0098801aa

diff --git a/lib/libv4lconvert/control/libv4lcontrol.c 
b/lib/libv4lconvert/control/libv4lcontrol.c
index 088e936..e09159d 100644
--- a/lib/libv4lconvert/control/libv4lcontrol.c
+++ b/lib/libv4lconvert/control/libv4lcontrol.c
@@ -528,15 +528,6 @@ static void v4lcontrol_get_flags_from_db(struct 
v4lcontrol_data *data,
        v4lcontrol_get_dmi_string(sysfs_prefix, "board_version", 
dmi_board_version,
                        sizeof(dmi_board_version));
 
-       for (i = 0; i < ARRAY_SIZE(upside_down); i++)
-               if (find_dmi_string(upside_down[i].board_vendor, 
dmi_board_vendor) &&
-                   find_dmi_string(upside_down[i].board_name, dmi_board_name) 
&&
-                   find_usb_id(upside_down[i].camera_id, vendor_id, 
product_id)) {
-                       /* found entry */
-                       data->flags |= V4LCONTROL_HFLIPPED | 
V4LCONTROL_VFLIPPED;
-                       break;
-               }
- 
        for (i = 0; i < ARRAY_SIZE(v4lcontrol_flags); i++)
                if (v4lcontrol_flags[i].vendor_id == vendor_id &&
                                v4lcontrol_flags[i].product_id ==
@@ -557,6 +548,17 @@ static void v4lcontrol_get_flags_from_db(struct 
v4lcontrol_data *data,
                                 !strcmp(v4lcontrol_flags[i].dmi_board_version, 
dmi_board_version))) {
                        data->flags |= v4lcontrol_flags[i].flags;
                        data->flags_info = &v4lcontrol_flags[i];
+                       /* Entries in the v4lcontrol_flags table override
+                          wildcard matches in the upside_down table. */
+                       return;
+               }
+
+       for (i = 0; i < ARRAY_SIZE(upside_down); i++)
+               if (find_dmi_string(upside_down[i].board_vendor, 
dmi_board_vendor) &&
+                   find_dmi_string(upside_down[i].board_name, dmi_board_name) 
&&
+                   find_usb_id(upside_down[i].camera_id, vendor_id, 
product_id)) {
+                       /* found entry */
+                       data->flags |= V4LCONTROL_HFLIPPED | 
V4LCONTROL_VFLIPPED;
                        break;
                }
 }

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to