summaryrefslogtreecommitdiffstats
path: root/drivers/extcon
diff options
context:
space:
mode:
authorNikesh Oswal <Nikesh.Oswal@wolfsonmicro.com>2014-05-29 16:27:52 +0100
committerChanwoo Choi <cw00.choi@samsung.com>2014-06-16 13:33:19 +0900
commit34602486d048910fa9c360519b9512b53382e60f (patch)
treeb8a96bf59a9696b34092af4e3c8e497fe743ed49 /drivers/extcon
parent5a8844b596d5a6008b14d2677b426ac7ed7d260b (diff)
downloadlinux-34602486d048910fa9c360519b9512b53382e60f.tar.bz2
extcon: arizona: Use extcon cable API with index of extcon cable instead of string
Use extcon cable API instead of state API as it is much more idiomatic. Signed-off-by: Nikesh Oswal <Nikesh.Oswal@wolfsonmicro.com> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> [Modify patch title by Chanwoo Choi] Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon')
-rw-r--r--drivers/extcon/extcon-arizona.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index 21ee055b1b77..f2c36b15a845 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -669,9 +669,8 @@ err:
ARIZONA_ACCDET_MODE_MASK, ARIZONA_ACCDET_MODE_MIC);
/* Just report headphone */
- ret = extcon_update_state(info->edev,
- 1 << ARIZONA_CABLE_HEADPHONE,
- 1 << ARIZONA_CABLE_HEADPHONE);
+ ret = extcon_set_cable_state_(info->edev,
+ ARIZONA_CABLE_HEADPHONE, true);
if (ret != 0)
dev_err(arizona->dev, "Failed to report headphone: %d\n", ret);
@@ -728,9 +727,8 @@ err:
ARIZONA_ACCDET_MODE_MASK, ARIZONA_ACCDET_MODE_MIC);
/* Just report headphone */
- ret = extcon_update_state(info->edev,
- 1 << ARIZONA_CABLE_HEADPHONE,
- 1 << ARIZONA_CABLE_HEADPHONE);
+ ret = extcon_set_cable_state_(info->edev,
+ ARIZONA_CABLE_HEADPHONE, true);
if (ret != 0)
dev_err(arizona->dev, "Failed to report headphone: %d\n", ret);
@@ -817,9 +815,8 @@ static void arizona_micd_detect(struct work_struct *work)
if (info->detecting && (val & ARIZONA_MICD_LVL_8)) {
arizona_identify_headphone(info);
- ret = extcon_update_state(info->edev,
- 1 << ARIZONA_CABLE_MICROPHONE,
- 1 << ARIZONA_CABLE_MICROPHONE);
+ ret = extcon_set_cable_state_(info->edev,
+ ARIZONA_CABLE_MICROPHONE, true);
if (ret != 0)
dev_err(arizona->dev, "Headset report failed: %d\n",