diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-12-10 17:20:28 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-12-17 11:00:09 +0100 |
commit | b8f1ba99cea540903154d34888d7d310cc54ea4f (patch) | |
tree | fad03ca9d16d6a685d14183cd2e20ae78d9d61ff | |
parent | f59f93cd1d720809466c7fd5aa16a236156c672b (diff) | |
download | linux-b8f1ba99cea540903154d34888d7d310cc54ea4f.tar.gz linux-b8f1ba99cea540903154d34888d7d310cc54ea4f.tar.bz2 linux-b8f1ba99cea540903154d34888d7d310cc54ea4f.zip |
usb: hub: make wait_for_connected() take an int instead of a pointer to int
The wait_for_connected() function doesn't modify "*port1" and there is
no need to pass a pointer. Just pass the int itself.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20211210142028.GB18906@kili
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/core/hub.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index e907dfa0ca6d..53275c45bc87 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -3572,7 +3572,7 @@ static int finish_port_resume(struct usb_device *udev) * This routine should only be called when persist is enabled. */ static int wait_for_connected(struct usb_device *udev, - struct usb_hub *hub, int *port1, + struct usb_hub *hub, int port1, u16 *portchange, u16 *portstatus) { int status = 0, delay_ms = 0; @@ -3586,7 +3586,7 @@ static int wait_for_connected(struct usb_device *udev, } msleep(20); delay_ms += 20; - status = hub_port_status(hub, *port1, portstatus, portchange); + status = hub_port_status(hub, port1, portstatus, portchange); } dev_dbg(&udev->dev, "Waited %dms for CONNECT\n", delay_ms); return status; @@ -3692,7 +3692,7 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg) } if (udev->persist_enabled) - status = wait_for_connected(udev, hub, &port1, &portchange, + status = wait_for_connected(udev, hub, port1, &portchange, &portstatus); status = check_port_resume_type(udev, |