Commit 202ad1a
usb: gadget: tegra-xudc: fix PM use count underflow
Upon resume from system suspend, the PM runtime core issues the
following warning:
tegra-xudc 3550000.usb: Runtime PM usage count underflow!
This is because tegra_xudc_resume() unconditionally calls
schedule_work(&xudc->usb_role_sw_work) whether or not anything has
changed, which causes tegra_xudc_device_mode_off() to be called
even when we're already in that mode.
Keep track of the current state of "device_mode", and only schedule
this work if it has changed from the hardware state on resume.
Signed-off-by: "Russell King (Oracle)" <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent e664036 commit 202ad1a
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
| 505 | + | |
505 | 506 | | |
506 | 507 | | |
507 | 508 | | |
| |||
715 | 716 | | |
716 | 717 | | |
717 | 718 | | |
| 719 | + | |
| 720 | + | |
718 | 721 | | |
719 | 722 | | |
720 | 723 | | |
| |||
725 | 728 | | |
726 | 729 | | |
727 | 730 | | |
| 731 | + | |
| 732 | + | |
728 | 733 | | |
729 | 734 | | |
730 | 735 | | |
| |||
4044 | 4049 | | |
4045 | 4050 | | |
4046 | 4051 | | |
| 4052 | + | |
| 4053 | + | |
4047 | 4054 | | |
4048 | 4055 | | |
4049 | | - | |
4050 | | - | |
4051 | 4056 | | |
4052 | 4057 | | |
4053 | 4058 | | |
| |||
0 commit comments