LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/2] usbip: Remove repeated setting of hcd->state in vhci_bus_suspend()
@ 2019-05-06 12:55 Suwan Kim
  2019-05-06 12:55 ` [PATCH 2/2] usbip: Remove repeated setting of hcd->state in vhci_bus_resume() Suwan Kim
  2019-05-06 15:13 ` [PATCH 1/2] usbip: Remove repeated setting of hcd->state in vhci_bus_suspend() shuah
  0 siblings, 2 replies; 7+ messages in thread
From: Suwan Kim @ 2019-05-06 12:55 UTC (permalink / raw)
  To: shuah, valentina.manea.m, gregkh; +Cc: linux-usb, linux-kernel, Suwan Kim

When hcd suspends execution, hcd_bus_suspend() calls vhci_bus_suspend()
which sets hcd->state as HC_STATE_SUSPENDED. But after calling
vhci_bus_suspend(), hcd_bus_suspend() also sets hcd->state as
HC_STATE_SUSPENDED.
So, setting hcd->state in vhci_hcd_suspend() is unnecessary.

Signed-off-by: Suwan Kim <suwan.kim027@gmail.com>
---
 drivers/usb/usbip/vhci_hcd.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/usb/usbip/vhci_hcd.c b/drivers/usb/usbip/vhci_hcd.c
index 667d9c0ec905..e6f378d00fb6 100644
--- a/drivers/usb/usbip/vhci_hcd.c
+++ b/drivers/usb/usbip/vhci_hcd.c
@@ -1238,10 +1238,6 @@ static int vhci_bus_suspend(struct usb_hcd *hcd)
 
 	dev_dbg(&hcd->self.root_hub->dev, "%s\n", __func__);
 
-	spin_lock_irqsave(&vhci->lock, flags);
-	hcd->state = HC_STATE_SUSPENDED;
-	spin_unlock_irqrestore(&vhci->lock, flags);
-
 	return 0;
 }
 
-- 
2.20.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-05-14 11:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-06 12:55 [PATCH 1/2] usbip: Remove repeated setting of hcd->state in vhci_bus_suspend() Suwan Kim
2019-05-06 12:55 ` [PATCH 2/2] usbip: Remove repeated setting of hcd->state in vhci_bus_resume() Suwan Kim
2019-05-06 15:16   ` shuah
2019-05-06 15:13 ` [PATCH 1/2] usbip: Remove repeated setting of hcd->state in vhci_bus_suspend() shuah
2019-05-07 15:49   ` Suwan Kim
2019-05-08 17:28     ` shuah
2019-05-14 11:58       ` Suwan Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).