File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
drivers/usb/typec/altmodes Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ static void tbt_altmode_work(struct work_struct *work)
112
112
return ;
113
113
114
114
disable_plugs :
115
- for (int i = TYPEC_PLUG_SOP_PP ; i > 0 ; -- i ) {
115
+ for (int i = TYPEC_PLUG_SOP_PP ; i >= 0 ; -- i ) {
116
116
if (tbt -> plug [i ])
117
117
typec_altmode_put_plug (tbt -> plug [i ]);
118
118
@@ -143,7 +143,7 @@ static int tbt_enter_modes_ordered(struct typec_altmode *alt)
143
143
if (tbt -> plug [TYPEC_PLUG_SOP_P ]) {
144
144
ret = typec_cable_altmode_enter (alt , TYPEC_PLUG_SOP_P , NULL );
145
145
if (ret < 0 ) {
146
- for (int i = TYPEC_PLUG_SOP_PP ; i > 0 ; -- i ) {
146
+ for (int i = TYPEC_PLUG_SOP_PP ; i >= 0 ; -- i ) {
147
147
if (tbt -> plug [i ])
148
148
typec_altmode_put_plug (tbt -> plug [i ]);
149
149
@@ -324,7 +324,7 @@ static void tbt_altmode_remove(struct typec_altmode *alt)
324
324
{
325
325
struct tbt_altmode * tbt = typec_altmode_get_drvdata (alt );
326
326
327
- for (int i = TYPEC_PLUG_SOP_PP ; i > 0 ; -- i ) {
327
+ for (int i = TYPEC_PLUG_SOP_PP ; i >= 0 ; -- i ) {
328
328
if (tbt -> plug [i ])
329
329
typec_altmode_put_plug (tbt -> plug [i ]);
330
330
}
You can’t perform that action at this time.
0 commit comments