From: Robert Baldyga Date: Thu, 31 Jul 2014 13:58:19 +0000 (+0200) Subject: Revert "WIP: extcon: do not update cable state if notifier cannot handle it" X-Git-Tag: accepted/tizen/3.0.2015.q2/common/20150615.160028~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F75%2F36875%2F3;p=platform%2Fkernel%2Flinux-3.10.git 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 --- 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);