usb: typec: tps6598x: Fix fault at module removal
Subsystems (2)
PATCH 1/1 usb: typec: tps6598x: Fix fault at module removal
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 <[email protected]>
--- drivers/usb/typec/tipd/core.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/typec/tipd/core.c +3 -0
@@ -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);
Signature · 1 line
2.34.1
Quoted 5 lines · Roger Quadros
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 <[email protected]>
Reviewed-by Heikki Krogerus <[email protected]>
Quoted 20 lines
--- drivers/usb/typec/tipd/core.c | 3 +++ 1 file changed, 3 insertions(+)drivers/usb/typec/tipd/core.c +3
-0@@ -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);Signature · 1 line
2.34.1
Signature · 1 line
heikki