Revert "WIP: extcon: do not update cable state if notifier cannot handle it" 75/36875/3
authorRobert Baldyga <r.baldyga@samsung.com>
Thu, 31 Jul 2014 13:58:19 +0000 (15:58 +0200)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 10 Jun 2015 11:47:16 +0000 (20:47 +0900)
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>
drivers/extcon/extcon-class.c

index 3bc083b..45a5271 100644 (file)
@@ -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);