From: Axel Lin Date: Sat, 16 Jun 2012 03:36:08 +0000 (+0800) Subject: extcon: Fix wrong index in max8997_extcon_cable[] X-Git-Tag: v5.15~22197^2~2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=155cb06c89f13af3e3e6bd520b9c62762f532d7b;p=mirror_ubuntu-kernels.git extcon: Fix wrong index in max8997_extcon_cable[] Currently, the index of "Dock-desk" and "Dock-card" are the same. Thus the latter one overrides the first one. Then we have problem when calling extcon_find_cable_index() because edev->supported_cable[7] only matches "Dock-card". Signed-off-by: Axel Lin Acked-by: Kyungmin Park Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c index 23416e443765..5ecf1763b5d4 100644 --- a/drivers/extcon/extcon-max8997.c +++ b/drivers/extcon/extcon-max8997.c @@ -116,8 +116,8 @@ const char *max8997_extcon_cable[] = { [5] = "Charge-downstream", [6] = "MHL", [7] = "Dock-desk", - [7] = "Dock-card", - [8] = "JIG", + [8] = "Dock-card", + [9] = "JIG", NULL, };