aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/usb/typec/anx7411.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/typec/anx7411.c')
-rw-r--r--drivers/usb/typec/anx7411.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/usb/typec/anx7411.c b/drivers/usb/typec/anx7411.c
index c0f0842d443c..b8f3b75fd7eb 100644
--- a/drivers/usb/typec/anx7411.c
+++ b/drivers/usb/typec/anx7411.c
@@ -1105,7 +1105,7 @@ static int anx7411_typec_switch_probe(struct anx7411_data *ctx,
int ret;
struct device_node *node;
- node = of_find_node_by_name(dev->of_node, "orientation_switch");
+ node = of_get_child_by_name(dev->of_node, "orientation_switch");
if (!node)
return 0;
@@ -1115,7 +1115,7 @@ static int anx7411_typec_switch_probe(struct anx7411_data *ctx,
return ret;
}
- node = of_find_node_by_name(dev->of_node, "mode_switch");
+ node = of_get_child_by_name(dev->of_node, "mode_switch");
if (!node) {
dev_err(dev, "no typec mux exist");
ret = -ENODEV;
@@ -1541,7 +1541,7 @@ free_i2c_dummy:
return ret;
}
-static int anx7411_i2c_remove(struct i2c_client *client)
+static void anx7411_i2c_remove(struct i2c_client *client)
{
struct anx7411_data *plat = i2c_get_clientdata(client);
@@ -1565,8 +1565,6 @@ static int anx7411_i2c_remove(struct i2c_client *client)
typec_unregister_port(plat->typec.port);
anx7411_port_unregister_altmodes(plat->typec.port_amode);
-
- return 0;
}
static const struct i2c_device_id anx7411_id[] = {