On 10/4/19 8:08 AM, Heikki Krogerus wrote:
There are no more users for them.
Signed-off-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>
---
drivers/usb/typec/class.c | 38 ++++++++++----------------------------
include/linux/usb/typec.h | 17 -----------------
2 files changed, 10 insertions(+), 45 deletions(-)
diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c
index f4972b7ee022..e7b92f650ba0 100644
--- a/drivers/usb/typec/class.c
+++ b/drivers/usb/typec/class.c
@@ -52,7 +52,6 @@ struct typec_port {
struct typec_switch *sw;
struct typec_mux *mux;
- const struct typec_capability *orig_cap; /* to be removed */
const struct typec_capability *cap;
const struct typec_operations *ops;
};
@@ -957,7 +956,7 @@ preferred_role_store(struct device *dev, struct device_attribute *attr,
return -EOPNOTSUPP;
}
- if (!port->cap->try_role || (!port->ops && !port->ops->try_role)) {
+ if (!port->ops && !port->ops->try_role) {
I think this should be
if (!port->ops || !port->ops->try_role) {
or the code would crash if port->ops is NULL. Same everywhere else below.
Guenter