Commit 4660e4ae authored by Hans de Goede's avatar Hans de Goede Committed by Greg Kroah-Hartman

staging: typec: fusb302: Use client->irq as irq if set

The fusb302 is also used on x86 systems where the platform code sets
the irq in client->irq and there is no gpio named fcs,int_n.

Cc: "Yueyao (Nathan) Zhu" <yueyao@google.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 097578ec
...@@ -1735,9 +1735,13 @@ static int fusb302_probe(struct i2c_client *client, ...@@ -1735,9 +1735,13 @@ static int fusb302_probe(struct i2c_client *client,
goto destroy_workqueue; goto destroy_workqueue;
} }
ret = init_gpio(chip); if (client->irq) {
if (ret < 0) chip->gpio_int_n_irq = client->irq;
goto destroy_workqueue; } else {
ret = init_gpio(chip);
if (ret < 0)
goto destroy_workqueue;
}
chip->tcpm_port = tcpm_register_port(&client->dev, &chip->tcpc_dev); chip->tcpm_port = tcpm_register_port(&client->dev, &chip->tcpc_dev);
if (IS_ERR(chip->tcpm_port)) { if (IS_ERR(chip->tcpm_port)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment