.. | .. |
---|
1203 | 1203 | static int ucsi_init(struct ucsi *ucsi) |
---|
1204 | 1204 | { |
---|
1205 | 1205 | struct ucsi_connector *con; |
---|
1206 | | - u64 command; |
---|
| 1206 | + u64 command, ntfy; |
---|
1207 | 1207 | int ret; |
---|
1208 | 1208 | int i; |
---|
1209 | 1209 | |
---|
.. | .. |
---|
1215 | 1215 | } |
---|
1216 | 1216 | |
---|
1217 | 1217 | /* 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; |
---|
1220 | 1220 | ret = ucsi_send_command(ucsi, command, NULL, 0); |
---|
1221 | 1221 | if (ret < 0) |
---|
1222 | 1222 | goto err_reset; |
---|
.. | .. |
---|
1248 | 1248 | } |
---|
1249 | 1249 | |
---|
1250 | 1250 | /* 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; |
---|
1253 | 1253 | ret = ucsi_send_command(ucsi, command, NULL, 0); |
---|
1254 | 1254 | if (ret < 0) |
---|
1255 | 1255 | goto err_unregister; |
---|
1256 | 1256 | |
---|
| 1257 | + ucsi->ntfy = ntfy; |
---|
1257 | 1258 | return 0; |
---|
1258 | 1259 | |
---|
1259 | 1260 | err_unregister: |
---|