]> www.infradead.org Git - users/jedix/linux-maple.git/commit
usb: typec: ucsi: reorder operations in ucsi_run_command()
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 27 Jun 2024 14:44:46 +0000 (17:44 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jul 2024 14:04:50 +0000 (16:04 +0200)
commit6cbb7fc91085b39f681aa94ab1a9ce566a93f27b
tree7fb110be6a353f7b37ce99350793e5b8e0bab4b4
parent584e8df58942338602c70686b451b5c3093543a1
usb: typec: ucsi: reorder operations in ucsi_run_command()

Streamline control stream of ucsi_run_command(). Reorder operations so
that there is only one call to ucsi_acknowledge(), making sure that all
complete commands are acknowledged. This also makes sure that the
command is acknowledged even if reading MESSAGE_IN data returns an
error.

Tested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240627-ucsi-rework-interface-v4-7-289ddc6874c7@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/ucsi.c