diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-21 08:13:02 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-21 08:13:02 +0200 |
| commit | 64ce7e9de7739cad574a965f27f6477c1342479f (patch) | |
| tree | 46058586d496e7b8746b57d75183dbfa590b13b7 /drivers/extcon/extcon.c | |
| parent | 555e7943f2818391c12aaa4b721b4f5ebb1fd036 (diff) | |
| parent | 8a9dbb779fe882325b9a0238494a7afaff2eb444 (diff) | |
| download | linux-64ce7e9de7739cad574a965f27f6477c1342479f.tar.gz linux-64ce7e9de7739cad574a965f27f6477c1342479f.tar.bz2 linux-64ce7e9de7739cad574a965f27f6477c1342479f.zip | |
Merge tag 'extcon-next-for-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next
Chanwoo writes:
Update extcon for 4.19
Detailed description for this pull request:
1. Release locking when sending the connector state in extcon_sync()
- Previously, extcon used the spinlock before calling the notifier_call_chain
to prevent the scheduled out of task and to prevent the notification delay.
When spinlock is locked for sending the notification, deadlock issue
occured on the side of extcon consumer device. To fix this issue on extcon
consumer device, release locking when sending the connector state.
2. Fix minor issues of extcon provider driver
- extcon-intel-int3496.c uses 'linux/gpio/consumer.h' instead of 'linux/gpio.h'
- extcon-usbc-cors-ec.c adds SPDX license and fix the wrong license information
Diffstat (limited to 'drivers/extcon/extcon.c')
| -rw-r--r-- | drivers/extcon/extcon.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c index af83ad58819c..b9d27c8fe57e 100644 --- a/drivers/extcon/extcon.c +++ b/drivers/extcon/extcon.c @@ -433,8 +433,8 @@ int extcon_sync(struct extcon_dev *edev, unsigned int id) return index; spin_lock_irqsave(&edev->lock, flags); - state = !!(edev->state & BIT(index)); + spin_unlock_irqrestore(&edev->lock, flags); /* * Call functions in a raw notifier chain for the specific one @@ -448,6 +448,7 @@ int extcon_sync(struct extcon_dev *edev, unsigned int id) */ raw_notifier_call_chain(&edev->nh_all, state, edev); + spin_lock_irqsave(&edev->lock, flags); /* This could be in interrupt handler */ prop_buf = (char *)get_zeroed_page(GFP_ATOMIC); if (!prop_buf) { |
