diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2020-02-11 14:25:30 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-12 21:51:21 +0300 |
commit | bbe80c9a89b868e98ef0710cb03ee68dd78a4d8d (patch) | |
tree | 63b64a0f8065fa8b32dbec335846514ff1772a36 /drivers/usb/typec/bus.c | |
parent | 684cb4b79e594f786b942a3ac5097ecf0e9e3e08 (diff) | |
download | linux-bbe80c9a89b868e98ef0710cb03ee68dd78a4d8d.tar.xz |
usb: typec: altmode: Remove the notification chain
Using the generic notification chain is not reasonable with
the alternate modes because it would require dependencies
between the drivers of the components that need the
notifications, and the typec drivers.
There are no users for the alternate mode notifications, so
removing the chain and the API for it completely.
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20200211112531.86510-6-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec/bus.c')
-rw-r--r-- | drivers/usb/typec/bus.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/usb/typec/bus.c b/drivers/usb/typec/bus.c index 2e45eb479386..c823122f9cb7 100644 --- a/drivers/usb/typec/bus.c +++ b/drivers/usb/typec/bus.c @@ -30,17 +30,10 @@ static int typec_altmode_set_state(struct typec_altmode *adev, { bool is_port = is_typec_port(adev->dev.parent); struct altmode *port_altmode; - int ret; port_altmode = is_port ? to_altmode(adev) : to_altmode(adev)->partner; - ret = typec_altmode_set_mux(port_altmode, conf, data); - if (ret) - return ret; - - blocking_notifier_call_chain(&port_altmode->nh, conf, NULL); - - return 0; + return typec_altmode_set_mux(port_altmode, conf, data); } /* -------------------------------------------------------------------------- */ @@ -82,9 +75,6 @@ int typec_altmode_notify(struct typec_altmode *adev, if (ret) return ret; - blocking_notifier_call_chain(is_port ? &altmode->nh : &partner->nh, - conf, data); - if (partner->adev.ops && partner->adev.ops->notify) return partner->adev.ops->notify(&partner->adev, conf, data); |