Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1464838
| From | Guenter Roeck <groeck@chromium.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC PATCH v2 1/4] usb: typec: Do not check if connected when setting roles |
| Date | 2016-08-18 00:10 +0200 |
| Message-ID | <s7hc5-7n7-13@gated-at.bofh.it> (permalink) |
| References | <s7hc5-7n7-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The connection status can change after the connection status was checked. Leave it up to the driver to perform the necessary checks. Signed-off-by: Guenter Roeck <groeck@chromium.org> --- v2: Rebased to v5 of Type-C class code drivers/usb/typec/typec.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/usb/typec/typec.c b/drivers/usb/typec/typec.c index 52a0431253a8..fa0261dad3b7 100644 --- a/drivers/usb/typec/typec.c +++ b/drivers/usb/typec/typec.c @@ -785,9 +785,6 @@ current_data_role_store(struct device *dev, struct device_attribute *attr, return -EOPNOTSUPP; } - if (!port->connected) - return size; - ret = sysfs_strmatch(typec_data_roles, ARRAY_SIZE(typec_data_roles), buf); if (ret < 0) @@ -851,9 +848,6 @@ static ssize_t current_power_role_store(struct device *dev, return -EIO; } - if (!port->connected) - return size; - ret = sysfs_strmatch(typec_roles, ARRAY_SIZE(typec_roles), buf); if (ret < 0) return ret; -- 2.8.0.rc3.226.g39d4020
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH v2 0/4] Type-C Port Manager Guenter Roeck <groeck@chromium.org> - 2016-08-18 00:10 +0200
[RFC PATCH v2 1/4] usb: typec: Do not check if connected when setting roles Guenter Roeck <groeck@chromium.org> - 2016-08-18 00:10 +0200
[RFC PATCH v2 4/4] usb: typec: Type-C Port Controller Interface driver (tcpci) Guenter Roeck <groeck@chromium.org> - 2016-08-18 00:10 +0200
Re: [RFC PATCH v2 0/4] Type-C Port Manager Oliver Neukum <oneukum@suse.com> - 2016-08-18 09:50 +0200
Re: [RFC PATCH v2 0/4] Type-C Port Manager Guenter Roeck <groeck@google.com> - 2016-08-18 15:20 +0200
csiph-web