]> Git Repo - linux.git/commitdiff
extcon: ptn5150: Do not print error during probe if nothing is attached
authorKrzysztof Kozlowski <[email protected]>
Wed, 9 Sep 2020 15:01:29 +0000 (17:01 +0200)
committerChanwoo Choi <[email protected]>
Tue, 29 Sep 2020 15:38:54 +0000 (00:38 +0900)
The commit 85256f611f66 ("extcon: ptn5150: Check current USB mode when
probing") reused code for checking CC status register in the probe path
to determine what is initially connected.  However if nothing is
connected, the CC status register will have 0x0 value and print an error
message:

    ptn5150 1-003d: Unknown Port status : 0

This is not an error.  Also any other unknown port status values are not
really errors but unhandled cases.

Fixes: 85256f611f66 ("extcon: ptn5150: Check current USB mode when probing")
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
drivers/extcon/extcon-ptn5150.c

index 1b68f56d8372d7663a42e9b4b1eb7d50a76fe2da..5b9a3cf8df268e2b3bcd80ac66d563eaaa5b68ad 100644 (file)
@@ -97,7 +97,6 @@ static void ptn5150_check_state(struct ptn5150_info *info)
                extcon_set_state_sync(info->edev, EXTCON_USB_HOST, true);
                break;
        default:
-               dev_err(info->dev, "Unknown Port status : %x\n", port_status);
                break;
        }
 }
This page took 0.047323 seconds and 4 git commands to generate.