usb: typec: displayport: Reduce noise from the driver
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Mon, 28 Sep 2020 13:33:24 +0000 (16:33 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Oct 2020 09:30:10 +0000 (11:30 +0200)
It's not an error if the mode can't be entered because
another mode is already active, so no longer printing an
error message if that happens.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20200928133324.48841-1-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/altmodes/displayport.c

index 7b20073..e62e5e3 100644 (file)
@@ -190,7 +190,7 @@ static void dp_altmode_work(struct work_struct *work)
        switch (dp->state) {
        case DP_STATE_ENTER:
                ret = typec_altmode_enter(dp->alt, NULL);
-               if (ret)
+               if (ret && ret != -EBUSY)
                        dev_err(&dp->alt->dev, "failed to enter mode\n");
                break;
        case DP_STATE_UPDATE: