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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJbT9aFAAoJEJzN3yze689TAiwP/iKiT9KNe8z2u91XxZfq7hDS EfaGh1heo98+iLWq/rQNd/ddbHdUxUAlviX44LEIWhKTODZO3VlnlCqQven08K3o E+rBiJgbCYYsjKdSt+tJ78FM90LSINUCSb12gaVyXwZLAX1xL005Pd4BmdFitztw TeIK2Zdfsr3tiPX0OLCyx0PXghJADQ7O4PDQSR+RzXZTLKwbyHR59v0QzZyLJUFe Hsajp0ozEqfWzkRRCm6okqLA2rQ/ahL8JwAZevXEki10gFOsiLJZmd/xEUGJyIWT SerkstmNil5tqcGoVrbhUOP5hdgVqudvvd9ICwjLudwDUD95tQsjNHIc3vlFZEzS QWwvajN3RjDvaYXUZlj9POJRDRFYpO3X0UTOBMOURWQSfZam+gfKpVlIRPBxfMFg wUfnEsu6OPpLywEIjAw8c4vCEeo2iv9kMqA5QCYnThqwHtgCAa+QrDCdbI1hLKfC +/XRK5J8PUoAKzCwQs9IN8LXszOUs3d/wjG2f62Le9fN4ZQj3/vtBEjbDxNp6pSu xrckO4o70v4iCx5lf4Rt/r8BUXss5GhCg5NXmTBclU35qCV9AQ3LcnNuTq+ku3Dy N+HFomrkc6s74fvf7fHk9eghG2piXqysNcTwlml4F4wcNlv+QdAodENmH+g9DP1Z 3mV9bUMphpb8LwlbPgMw =Iuyb -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
64ce7e9de7
3 changed files with 9 additions and 18 deletions
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/extcon-provider.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
|
|
@ -1,18 +1,8 @@
|
|||
/**
|
||||
* drivers/extcon/extcon-usbc-cros-ec - ChromeOS Embedded Controller extcon
|
||||
*
|
||||
* Copyright (C) 2017 Google, Inc
|
||||
* Author: Benson Leung <bleung@chromium.org>
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
// ChromeOS Embedded Controller extcon
|
||||
//
|
||||
// Copyright (C) 2017 Google, Inc.
|
||||
// Author: Benson Leung <bleung@chromium.org>
|
||||
|
||||
#include <linux/extcon-provider.h>
|
||||
#include <linux/kernel.h>
|
||||
|
@ -548,4 +538,4 @@ module_platform_driver(extcon_cros_ec_driver);
|
|||
|
||||
MODULE_DESCRIPTION("ChromeOS Embedded Controller extcon driver");
|
||||
MODULE_AUTHOR("Benson Leung <bleung@chromium.org>");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue