extcon: arizona: Use DAPM mutex helper functions
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Tue, 29 Dec 2015 16:32:03 +0000 (16:32 +0000)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 25 Jan 2016 04:16:53 +0000 (13:16 +0900)
We should be using the helper functions to lock the DAPM mutex not
accessing it directly. There are no ill effects of this as the moment
but it is best practice, and the implementation could be changed in the
future.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/extcon/extcon-arizona.c

index c121d01a5cd6f24f1e9b452ee927fcd102eda757..1d8e0a57bd51bbe84a8ecd29d53717f2465922de 100644 (file)
@@ -185,7 +185,7 @@ static void arizona_extcon_hp_clamp(struct arizona_extcon_info *info,
                break;
        };
 
-       mutex_lock(&arizona->dapm->card->dapm_mutex);
+       snd_soc_dapm_mutex_lock(arizona->dapm);
 
        arizona->hpdet_clamp = clamp;
 
@@ -227,7 +227,7 @@ static void arizona_extcon_hp_clamp(struct arizona_extcon_info *info,
                                 ret);
        }
 
-       mutex_unlock(&arizona->dapm->card->dapm_mutex);
+       snd_soc_dapm_mutex_unlock(arizona->dapm);
 }
 
 static void arizona_extcon_set_mode(struct arizona_extcon_info *info, int mode)