diff options
| -rw-r--r-- | drivers/extcon/extcon-ptn5150.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/extcon/extcon-ptn5150.c b/drivers/extcon/extcon-ptn5150.c index de753d00c4c2..eca1b140aeb0 100644 --- a/drivers/extcon/extcon-ptn5150.c +++ b/drivers/extcon/extcon-ptn5150.c @@ -352,6 +352,8 @@ static int ptn5150_i2c_probe(struct i2c_client *i2c) } info->role_sw = usb_role_switch_get(info->dev); + if (!info->role_sw && connector) + info->role_sw = fwnode_usb_role_switch_get(connector); if (IS_ERR(info->role_sw)) return dev_err_probe(info->dev, PTR_ERR(info->role_sw), "failed to get role switch\n"); |
