From: Chanwoo Choi <cw00.choi@samsung.com> Date: Thu, 21 Jul 2016 11:00:29 +0000 (+0900) Subject: UPSTREAM: extcon: gpio: Remove the usage of extcon_set_state() X-Git-Tag: firefly_0821_release~2012 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7e41a07369b681d2348471d8ef91694e03605932;p=firefly-linux-kernel-4.4.55.git UPSTREAM: extcon: gpio: Remove the usage of extcon_set_state() This patch removes the usage of extcon_set_state() because it uses the bit masking to change the state of external connectors. The extcon framework should handle the state by extcon_set_cable_state_() with extcon id. Change-Id: I726f690d900375d36001fe4eda9b53bcdd2b4f86 Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Chris Zhong <zyw@rock-chips.com> (cherry picked from commit 448991505c967d7b44ae9ea328224ec02858c8da) --- diff --git a/drivers/extcon/extcon-gpio.c b/drivers/extcon/extcon-gpio.c index 279ff8f6637d..46f3c5d813ea 100644 --- a/drivers/extcon/extcon-gpio.c +++ b/drivers/extcon/extcon-gpio.c @@ -49,7 +49,7 @@ static void gpio_extcon_work(struct work_struct *work) state = gpiod_get_value_cansleep(data->id_gpiod); if (data->pdata->gpio_active_low) state = !state; - extcon_set_state(data->edev, state); + extcon_set_cable_state_(data->edev, data->pdata->extcon_id, state); } static irqreturn_t gpio_irq_handler(int irq, void *dev_id)