Skip to content

Commit

Permalink
extcon: arizona: Use DAPM mutex helper functions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Charles Keepax authored and Chanwoo Choi committed Jan 25, 2016
1 parent 8b45b6a commit 03bf1ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/extcon/extcon-arizona.c
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 03bf1ad

Please sign in to comment.