diff options
author | Hans de Goede <hdegoede@redhat.com> | 2020-08-09 17:19:03 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-08-18 13:08:44 +0300 |
commit | 25794e3079d2a98547b6bf5764ef0240aa89b798 (patch) | |
tree | d7d7c6cc676b94d473875c98d03e237b85abd88d /net/unix/af_unix.c | |
parent | 7e90057f125c8c852940b848e06e7a72f050fc6f (diff) | |
download | linux-25794e3079d2a98547b6bf5764ef0240aa89b798.tar.xz |
usb: typec: ucsi: Rework ppm_lock handling
The ppm_lock really only needs to be hold during 2 functions:
ucsi_reset_ppm() and ucsi_run_command().
Push the taking of the lock down into these 2 functions, renaming
ucsi_run_command() to ucsi_send_command() which was an existing
wrapper already taking the lock for its callers.
This simplifies things for the callers and removes the difference
between ucsi_send_command() and ucsi_run_command() which has led
to various locking bugs in the past.
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20200809141904.4317-4-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions