From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Roger Quadros <rogerq@kernel.org>
Cc: gregkh@linuxfoundation.org, srk@ti.com, r-gunasekaran@ti.com,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: typec: tps6598x: Fix fault at module removal
Date: Fri, 21 Apr 2023 14:09:01 +0300 [thread overview]
Message-ID: <ZEJuzQSwSvP6p9gR@kuha.fi.intel.com> (raw)
In-Reply-To: <20230421101720.34318-1-rogerq@kernel.org>
On Fri, Apr 21, 2023 at 01:17:20PM +0300, Roger Quadros wrote:
> We need to cancel the delayed workqueue if it is being used
> else it will cause paging request fault during module removal.
>
> Fixes: 0d6a119cecd7 ("usb: typec: tps6598x: Add support for polling interrupts status")
> Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/usb/typec/tipd/core.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
> index 8b075ca82ef6..438cc40660a1 100644
> --- a/drivers/usb/typec/tipd/core.c
> +++ b/drivers/usb/typec/tipd/core.c
> @@ -886,6 +886,9 @@ static void tps6598x_remove(struct i2c_client *client)
> {
> struct tps6598x *tps = i2c_get_clientdata(client);
>
> + if (!client->irq)
> + cancel_delayed_work_sync(&tps->wq_poll);
> +
> tps6598x_disconnect(tps, 0);
> typec_unregister_port(tps->port);
> usb_role_switch_put(tps->role_sw);
> --
> 2.34.1
--
heikki
prev parent reply other threads:[~2023-04-21 11:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-21 10:17 [PATCH] usb: typec: tps6598x: Fix fault at module removal Roger Quadros
2023-04-21 11:09 ` Heikki Krogerus [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZEJuzQSwSvP6p9gR@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=r-gunasekaran@ti.com \
--cc=rogerq@kernel.org \
--cc=srk@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox