diff options
author | Chanwoo Choi <cw00.choi@samsung.com> | 2016-07-01 02:36:49 +0900 |
---|---|---|
committer | Kishon Vijay Abraham I <kishon@ti.com> | 2016-09-10 16:48:45 +0530 |
commit | cdc058320209d69a5eb7692658279e16aceb2d69 (patch) | |
tree | d735ce7f162f8e4945993b4a2fb5357505f0ee65 /drivers/extcon | |
parent | 32daff5d77eb8053c75ce35731ec89d1f7f8eab8 (diff) | |
download | linux-cdc058320209d69a5eb7692658279e16aceb2d69.tar.bz2 |
extcon: arizona: Remove the usage of extcon_update_state()
This patch remvoes the usage of extcon_update_state() because
the extcon_update_state() use directly the bit masking calculation
to change the state of external connector without the unique id of
external connector. It makes the code diffcult to read it.
So, this patch uses the extcon_set_cable_state_() instead.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/extcon')
-rw-r--r-- | drivers/extcon/extcon-arizona.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c index be4d93d4c546..493bd9fe5f67 100644 --- a/drivers/extcon/extcon-arizona.c +++ b/drivers/extcon/extcon-arizona.c @@ -1149,10 +1149,13 @@ static irqreturn_t arizona_jackdet(int irq, void *data) info->micd_ranges[i].key, 0); input_sync(info->input); - ret = extcon_update_state(info->edev, 0xffffffff, 0); - if (ret != 0) - dev_err(arizona->dev, "Removal report failed: %d\n", - ret); + for (i = 0; i < ARRAY_SIZE(arizona_cable) - 1; i++) { + ret = extcon_set_cable_state_(info->edev, + arizona_cable[i], false); + if (ret != 0) + dev_err(arizona->dev, + "Removal report failed: %d\n", ret); + } regmap_update_bits(arizona->regmap, ARIZONA_JACK_DETECT_DEBOUNCE, |