summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Baldyga <r.baldyga@samsung.com>2014-07-31 15:58:19 +0200
committerSeung-Woo Kim <sw0312.kim@samsung.com>2015-06-10 20:47:16 +0900
commit8561c7608398bdd1403eb770aa41b27dc9933bf9 (patch)
treeb446a680e4b50888818f5e3a4ce37fb808df0291
parent5caaa4c5080b69ee1569ae7ba36c61befe34cf06 (diff)
downloadlinux-3.10-8561c7608398bdd1403eb770aa41b27dc9933bf9.tar.gz
linux-3.10-8561c7608398bdd1403eb770aa41b27dc9933bf9.tar.bz2
linux-3.10-8561c7608398bdd1403eb770aa41b27dc9933bf9.zip
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 <r.baldyga@samsung.com>
-rw-r--r--drivers/extcon/extcon-class.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/extcon/extcon-class.c b/drivers/extcon/extcon-class.c
index 3bc083bb402..45a527111b8 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);