usb: cdns3: rename hibernated argument of role->resume() to lost_power
authorThéo Lebrun <theo.lebrun@bootlin.com>
Wed, 5 Feb 2025 17:36:48 +0000 (18:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Mar 2025 08:18:02 +0000 (09:18 +0100)
commit0bde749c58c72405c54a1eabf6266a0273377226
tree65c5ba31c80a53f6c93909d9d7a41fff7aa28a99
parent7aad3a42fee569ad141798a958c22eb683c37b69
usb: cdns3: rename hibernated argument of role->resume() to lost_power

The cdns_role_driver->resume() callback takes a second boolean argument
named `hibernated` in its implementations. This is mistaken; the only
potential caller is:

int cdns_resume(struct cdns *cdns)
{
/* ... */

if (cdns->roles[cdns->role]->resume)
cdns->roles[cdns->role]->resume(cdns, cdns_power_is_lost(cdns));

return 0;
}

The argument can be true in cases outside of return from hibernation.
Reflect the true meaning by renaming both arguments to `lost_power`.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Acked-by: Peter Chen <peter.chen@kernel.org>
Link: https://lore.kernel.org/r/20250205-s2r-cdns-v7-3-13658a271c3c@bootlin.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/cdns3/cdns3-gadget.c
drivers/usb/cdns3/cdnsp-gadget.c
drivers/usb/cdns3/core.h