From 8561c7608398bdd1403eb770aa41b27dc9933bf9 Mon Sep 17 00:00:00 2001 From: Robert Baldyga Date: Thu, 31 Jul 2014 15:58:19 +0200 Subject: [PATCH] Revert "WIP: extcon: do not update cable state if notifier cannot handle it" This reverts commit da1c928ee89c224a8ab26e77514149f5f286cb3d. Reverted commit introduces change which can cause cable state change loss, and breaks extcon drivers when there are no one notifier registered - state in sysfs does not change so debugging is impeded. Change-Id: I7b3919494023aeff0ae95301976d15d738fee65b Signed-off-by: Robert Baldyga --- drivers/extcon/extcon-class.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/extcon/extcon-class.c b/drivers/extcon/extcon-class.c index 3bc083b..45a5271 100644 --- a/drivers/extcon/extcon-class.c +++ b/drivers/extcon/extcon-class.c @@ -230,7 +230,6 @@ int extcon_update_state(struct extcon_dev *edev, u32 mask, u32 state) int env_offset = 0; int length; unsigned long flags; - int ret; spin_lock_irqsave(&edev->lock, flags); @@ -246,12 +245,7 @@ int extcon_update_state(struct extcon_dev *edev, u32 mask, u32 state) edev->state &= ~mask; edev->state |= state & mask; - ret = raw_notifier_call_chain(&edev->nh, old_state, edev); - if ((ret & ~NOTIFY_STOP_MASK) != NOTIFY_OK) { - edev->state = old_state; - spin_unlock_irqrestore(&edev->lock, flags); - return -ENODEV; - } + raw_notifier_call_chain(&edev->nh, old_state, edev); /* This could be in interrupt handler */ prop_buf = (char *)get_zeroed_page(GFP_ATOMIC); -- 2.7.4