lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 30 Aug 2017 11:48:08 +0200 From: Hans de Goede <hdegoede@...hat.com> To: Darren Hart <dvhart@...radead.org>, Andy Shevchenko <andy@...radead.org>, Wolfram Sang <wsa@...-dreams.de>, Sebastian Reichel <sre@...nel.org>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Guenter Roeck <linux@...ck-us.net>, Heikki Krogerus <heikki.krogerus@...ux.intel.com> Cc: Hans de Goede <hdegoede@...hat.com>, platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org, linux-i2c@...r.kernel.org, Liam Breck <liam@...workimprov.net>, Tony Lindgren <tony@...mide.com>, linux-pm@...r.kernel.org, devel@...verdev.osuosl.org, "Yueyao (Nathan) Zhu" <yueyao@...gle.com> Subject: [PATCH v3 05/11] 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@...gle.com> Signed-off-by: Hans de Goede <hdegoede@...hat.com> --- drivers/staging/typec/fusb302/fusb302.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/staging/typec/fusb302/fusb302.c b/drivers/staging/typec/fusb302/fusb302.c index 1c1751c994db..675161cf4f3a 100644 --- a/drivers/staging/typec/fusb302/fusb302.c +++ b/drivers/staging/typec/fusb302/fusb302.c @@ -1735,9 +1735,13 @@ static int fusb302_probe(struct i2c_client *client, goto destroy_workqueue; } - ret = init_gpio(chip); - if (ret < 0) - goto destroy_workqueue; + if (client->irq) { + chip->gpio_int_n_irq = client->irq; + } else { + ret = init_gpio(chip); + if (ret < 0) + goto destroy_workqueue; + } chip->tcpm_port = tcpm_register_port(&client->dev, &chip->tcpc_dev); if (IS_ERR(chip->tcpm_port)) { -- 2.13.4
Powered by blists - more mailing lists