Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1464836 > unrolled thread
| Started by | Guenter Roeck <groeck@chromium.org> |
|---|---|
| First post | 2016-08-18 00:10 +0200 |
| Last post | 2016-08-18 00:10 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[RFC PATCH v2 2/4] usb: typec: Do not update modes in class driver Guenter Roeck <groeck@chromium.org> - 2016-08-18 00:10 +0200
| From | Guenter Roeck <groeck@chromium.org> |
|---|---|
| Date | 2016-08-18 00:10 +0200 |
| Subject | [RFC PATCH v2 2/4] usb: typec: Do not update modes in class driver |
| Message-ID | <s7hc5-7n7-1@gated-at.bofh.it> |
Mode updates need to be triggered and reported by underlying drivers. Also add missing "if (ret)". Signed-off-by: Guenter Roeck <groeck@chromium.org> --- v2: Added fixup patch drivers/usb/typec/typec.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/usb/typec/typec.c b/drivers/usb/typec/typec.c index fa0261dad3b7..58de982ac927 100644 --- a/drivers/usb/typec/typec.c +++ b/drivers/usb/typec/typec.c @@ -533,7 +533,6 @@ typec_altmode_active_store(struct device *dev, struct device_attribute *attr, if (ret) return ret; - mode->active = activate; return size; } @@ -796,9 +795,6 @@ current_data_role_store(struct device *dev, struct device_attribute *attr, if (ret) return ret; - port->data_role = role; - sysfs_notify(&port->dev.kobj, NULL, "current_data_role"); - return size; } @@ -857,9 +853,6 @@ static ssize_t current_power_role_store(struct device *dev, ret = port->cap->pr_set(port->cap, role); return ret; - port->pwr_role = role; - sysfs_notify(&port->dev.kobj, NULL, "current_power_role"); - return size; } @@ -927,11 +920,9 @@ static ssize_t current_vconn_role_store(struct device *dev, role = ret; ret = port->cap->vconn_set(port->cap, role); + if (ret < 0) return ret; - port->pwr_role = role; - sysfs_notify(&port->dev.kobj, NULL, "current_vconn_role"); - return size; } -- 2.8.0.rc3.226.g39d4020
Back to top | Article view | linux.kernel
csiph-web