hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/usb/typec/ucsi/ucsi.c
....@@ -1203,7 +1203,7 @@
12031203 static int ucsi_init(struct ucsi *ucsi)
12041204 {
12051205 struct ucsi_connector *con;
1206
- u64 command;
1206
+ u64 command, ntfy;
12071207 int ret;
12081208 int i;
12091209
....@@ -1215,8 +1215,8 @@
12151215 }
12161216
12171217 /* Enable basic notifications */
1218
- ucsi->ntfy = UCSI_ENABLE_NTFY_CMD_COMPLETE | UCSI_ENABLE_NTFY_ERROR;
1219
- command = UCSI_SET_NOTIFICATION_ENABLE | ucsi->ntfy;
1218
+ ntfy = UCSI_ENABLE_NTFY_CMD_COMPLETE | UCSI_ENABLE_NTFY_ERROR;
1219
+ command = UCSI_SET_NOTIFICATION_ENABLE | ntfy;
12201220 ret = ucsi_send_command(ucsi, command, NULL, 0);
12211221 if (ret < 0)
12221222 goto err_reset;
....@@ -1248,12 +1248,13 @@
12481248 }
12491249
12501250 /* Enable all notifications */
1251
- ucsi->ntfy = UCSI_ENABLE_NTFY_ALL;
1252
- command = UCSI_SET_NOTIFICATION_ENABLE | ucsi->ntfy;
1251
+ ntfy = UCSI_ENABLE_NTFY_ALL;
1252
+ command = UCSI_SET_NOTIFICATION_ENABLE | ntfy;
12531253 ret = ucsi_send_command(ucsi, command, NULL, 0);
12541254 if (ret < 0)
12551255 goto err_unregister;
12561256
1257
+ ucsi->ntfy = ntfy;
12571258 return 0;
12581259
12591260 err_unregister: