usb: typec: Fix fast_role_swap_current show function
authorPavan Holla <pholla@chromium.org>
Wed, 7 Jun 2023 19:33:26 +0000 (19:33 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Jun 2023 14:00:57 +0000 (16:00 +0200)
commit3a1882841f646ebf01509958deb5e7778c16480b
treed76f743dccdfc7699caa9ce9d3f67e9f655f3770
parent2bf8ea2e9e39a2a9bd74e98310ef1b96017d6757
usb: typec: Fix fast_role_swap_current show function

commit 92c9c3baad6b1fd584fbabeaa4756f9b77926cb5 upstream.

The current implementation mistakenly performs a & operation on
the output of sysfs_emit. This patch performs the & operation before
calling sysfs_emit.

Fixes: 662a60102c12 ("usb: typec: Separate USB Power Delivery from USB Type-C")
Cc: stable <stable@kernel.org>
Reported-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Pavan Holla <pholla@chromium.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Benson Leung <bleung@chromium.org>
Message-ID: <20230607193328.3359487-1-pholla@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/pd.c