usb: typec: tcpm: Refactor tcpm_handle_vdm_request
authorHans de Goede <hdegoede@redhat.com>
Fri, 24 Jul 2020 17:47:00 +0000 (19:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jul 2020 12:11:05 +0000 (14:11 +0200)
commit95b4d51c96a87cd760c2a4f27fb28a59a27b6368
tree5ddf2077836506f2b635dd79b16a0f17935d0a2f
parent8afe9a3548f9d1805dcea6d97978f2179c8403a3
usb: typec: tcpm: Refactor tcpm_handle_vdm_request

Refactor tcpm_handle_vdm_request and its tcpm_pd_svdm helper function so
that reporting the results of the vdm to the altmode-driver is separated
out into a clear separate step inside tcpm_handle_vdm_request, instead
of being scattered over various places inside the tcpm_pd_svdm helper.

This is a preparation patch for fixing an AB BA lock inversion between the
tcpm code and some altmode drivers.

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20200724174702.61754-4-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm/tcpm.c