summaryrefslogtreecommitdiff
path: root/drivers/usb/typec/ucsi/displayport.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2019-10-28 22:36:29 +0300
committerJason Gunthorpe <jgg@mellanox.com>2019-10-28 22:36:29 +0300
commit036313316d3a38bfde9ba49b3d00f73b7d8019d2 (patch)
tree284127b68e10bd919adb420a5f37dc19d06532f6 /drivers/usb/typec/ucsi/displayport.c
parenta52dc3a100958f4bf5e921067ba626c2caf8e55f (diff)
parentd6d5df1db6e9d7f8f76d2911707f7d5877251b02 (diff)
downloadlinux-036313316d3a38bfde9ba49b3d00f73b7d8019d2.tar.xz
Merge tag 'v5.4-rc5' into rdma.git for-next
Linux 5.4-rc5 For dependencies in the next patches Conflict resolved by keeping the delete of the unlock. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/usb/typec/ucsi/displayport.c')
-rw-r--r--drivers/usb/typec/ucsi/displayport.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/typec/ucsi/displayport.c b/drivers/usb/typec/ucsi/displayport.c
index 6c103697c582..d99700cb4dca 100644
--- a/drivers/usb/typec/ucsi/displayport.c
+++ b/drivers/usb/typec/ucsi/displayport.c
@@ -75,6 +75,8 @@ static int ucsi_displayport_enter(struct typec_altmode *alt)
if (cur != 0xff) {
mutex_unlock(&dp->con->lock);
+ if (dp->con->port_altmode[cur] == alt)
+ return 0;
return -EBUSY;
}