diff mbox series

usb: roles: disable pm for role switch device

Message ID 1675419059-30078-1-git-send-email-quic_linyyuan@quicinc.com (mailing list archive)
State Superseded
Headers show
Series usb: roles: disable pm for role switch device | expand

Commit Message

Linyu Yuan Feb. 3, 2023, 10:10 a.m. UTC
there is no PM operation for a role switch device,
call device_set_pm_not_required() in usb_role_switch_register() to disable.

Cc: stable@vger.kernel.org # 5.4+
Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
---
 drivers/usb/roles/class.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Greg KH Feb. 3, 2023, 10:18 a.m. UTC | #1
On Fri, Feb 03, 2023 at 06:10:59PM +0800, Linyu Yuan wrote:
> there is no PM operation for a role switch device,
> call device_set_pm_not_required() in usb_role_switch_register() to disable.
> 
> Cc: stable@vger.kernel.org # 5.4+
> Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>

What commit id does this fix?

thanks,

greg k-h
diff mbox series

Patch

diff --git a/drivers/usb/roles/class.c b/drivers/usb/roles/class.c
index eacb46e..b303c64 100644
--- a/drivers/usb/roles/class.c
+++ b/drivers/usb/roles/class.c
@@ -344,6 +344,7 @@  usb_role_switch_register(struct device *parent,
 	dev_set_drvdata(&sw->dev, desc->driver_data);
 	dev_set_name(&sw->dev, "%s-role-switch",
 		     desc->name ? desc->name : dev_name(parent));
+	device_set_pm_not_required(&sw->dev);
 
 	ret = device_register(&sw->dev);
 	if (ret) {