]> Git Repo - linux.git/commitdiff
extcon: arizona: Always use pm_runtime_get_sync() when we need the device to be awake
authorHans de Goede <[email protected]>
Sun, 7 Mar 2021 15:17:59 +0000 (16:17 +0100)
committerLee Jones <[email protected]>
Thu, 18 Mar 2021 11:46:15 +0000 (11:46 +0000)
Before this commit the extcon-arizona code was mixing pm_runtime_get()
and pm_runtime_get_sync() in different places.

In all places where pm_runtime_get[_sync]() is called, the code
makes use of the device immediately after the call.
This means that we should always use pm_runtime_get_sync().

Signed-off-by: Hans de Goede <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Acked-by: Charles Keepax <[email protected]>
Tested-by: Charles Keepax <[email protected]>
Acked-by: Chanwoo Choi <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
drivers/extcon/extcon-arizona.c

index 72d23b15108cf1cac5b8e161c34c31f46649a0de..56d2ce05de505469bcdc8a86fe055b8a1fcdca4c 100644 (file)
@@ -290,7 +290,7 @@ static void arizona_start_mic(struct arizona_extcon_info *info)
        unsigned int mode;
 
        /* Microphone detection can't use idle mode */
-       pm_runtime_get(info->dev);
+       pm_runtime_get_sync(info->dev);
 
        if (info->detecting) {
                ret = regulator_allow_bypass(info->micvdd, false);
@@ -695,7 +695,7 @@ static void arizona_identify_headphone(struct arizona_extcon_info *info)
        dev_dbg(arizona->dev, "Starting HPDET\n");
 
        /* Make sure we keep the device enabled during the measurement */
-       pm_runtime_get(info->dev);
+       pm_runtime_get_sync(info->dev);
 
        info->hpdet_active = true;
 
This page took 0.056531 seconds and 4 git commands to generate.