diff options
author | Nikesh Oswal <Nikesh.Oswal@wolfsonmicro.com> | 2014-05-29 11:27:52 -0400 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2014-06-16 00:33:19 -0400 |
commit | 34602486d048910fa9c360519b9512b53382e60f (patch) | |
tree | b8a96bf59a9696b34092af4e3c8e497fe743ed49 /drivers/extcon | |
parent | 5a8844b596d5a6008b14d2677b426ac7ed7d260b (diff) |
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.c | 15 |
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: | |||
669 | ARIZONA_ACCDET_MODE_MASK, ARIZONA_ACCDET_MODE_MIC); | 669 | ARIZONA_ACCDET_MODE_MASK, ARIZONA_ACCDET_MODE_MIC); |
670 | 670 | ||
671 | /* Just report headphone */ | 671 | /* Just report headphone */ |
672 | ret = extcon_update_state(info->edev, | 672 | ret = extcon_set_cable_state_(info->edev, |
673 | 1 << ARIZONA_CABLE_HEADPHONE, | 673 | ARIZONA_CABLE_HEADPHONE, true); |
674 | 1 << ARIZONA_CABLE_HEADPHONE); | ||
675 | if (ret != 0) | 674 | if (ret != 0) |
676 | dev_err(arizona->dev, "Failed to report headphone: %d\n", ret); | 675 | dev_err(arizona->dev, "Failed to report headphone: %d\n", ret); |
677 | 676 | ||
@@ -728,9 +727,8 @@ err: | |||
728 | ARIZONA_ACCDET_MODE_MASK, ARIZONA_ACCDET_MODE_MIC); | 727 | ARIZONA_ACCDET_MODE_MASK, ARIZONA_ACCDET_MODE_MIC); |
729 | 728 | ||
730 | /* Just report headphone */ | 729 | /* Just report headphone */ |
731 | ret = extcon_update_state(info->edev, | 730 | ret = extcon_set_cable_state_(info->edev, |
732 | 1 << ARIZONA_CABLE_HEADPHONE, | 731 | ARIZONA_CABLE_HEADPHONE, true); |
733 | 1 << ARIZONA_CABLE_HEADPHONE); | ||
734 | if (ret != 0) | 732 | if (ret != 0) |
735 | dev_err(arizona->dev, "Failed to report headphone: %d\n", ret); | 733 | dev_err(arizona->dev, "Failed to report headphone: %d\n", ret); |
736 | 734 | ||
@@ -817,9 +815,8 @@ static void arizona_micd_detect(struct work_struct *work) | |||
817 | if (info->detecting && (val & ARIZONA_MICD_LVL_8)) { | 815 | if (info->detecting && (val & ARIZONA_MICD_LVL_8)) { |
818 | arizona_identify_headphone(info); | 816 | arizona_identify_headphone(info); |
819 | 817 | ||
820 | ret = extcon_update_state(info->edev, | 818 | ret = extcon_set_cable_state_(info->edev, |
821 | 1 << ARIZONA_CABLE_MICROPHONE, | 819 | ARIZONA_CABLE_MICROPHONE, true); |
822 | 1 << ARIZONA_CABLE_MICROPHONE); | ||
823 | 820 | ||
824 | if (ret != 0) | 821 | if (ret != 0) |
825 | dev_err(arizona->dev, "Headset report failed: %d\n", | 822 | dev_err(arizona->dev, "Headset report failed: %d\n", |