@@ -131,7 +131,10 @@ static const struct dmi_system_id upside_down_sensor_dmi_ids[] = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "XPS 13 9340"),
},
- .driver_data = "OVTI02C1",
+ .driver_data = &(struct upside_down_match_info) {
+ .type = UPSIDE_DOWN_MATCH_HID,
+ .ids = { "OVTI02C1", NULL, },
+ },
},
{
.matches = {
@@ -148,7 +151,10 @@ static const struct dmi_system_id upside_down_sensor_dmi_ids[] = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "XPS 14 9440"),
},
- .driver_data = "OVTI02C1",
+ .driver_data = &(struct upside_down_match_info) {
+ .type = UPSIDE_DOWN_MATCH_HID,
+ .ids = { "OVTI02C1", NULL, },
+ },
},
{
.matches = {
BugLink: https://bugs.launchpad.net/bugs/2169185 Commit 9cb88f2bb76d ("UBUNTU: SAUCE: media: ipu-bridge: correct platform handling for DELL Pro 14 Premium PA14260") changed the driver_data of upside_down_sensor_dmi_ids[] from a string to struct upside_down_match_info pointer. However Dell XPS 13 9340 and XPS 14 9440 entries were added just before that patch, outside its diff contex, so they had the older string instead of the struct. Since it's used as void *, compiler did not complain. ipu_bridge_parse_rotation() then reads the string bytes as match->type, which matches neither UPSIDE_DOWN_MATCH_HID nor UPSIDE_DOWN_MATCH_DSM, and causes no rotation to be applied. This fix updates those XPS entries to use the struct instead of the raw string. Fixes: 9cb88f2bb76d ("UBUNTU: SAUCE: media: ipu-bridge: correct platform handling for DELL Pro 14 Premium PA14260") Signed-off-by: Yufeng Gao <yufeng.gao@canonical.com> --- drivers/media/pci/intel/ipu-bridge.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)