提交 5475e631 编写于 作者: C Chanwoo Choi

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: NChanwoo Choi <cw00.choi@samsung.com>
Acked-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
上级 c19dc203
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册