]> git.baikalelectronics.ru Git - kernel.git/commit
r8152: adjust the settings of ups flags
authorHayes Wang <hayeswang@realtek.com>
Thu, 5 Sep 2019 02:46:20 +0000 (10:46 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Sep 2019 10:41:11 +0000 (12:41 +0200)
commite6ff20dda737373932937b60e1afd4c57613eb39
tree1702ed64d1d5a2703d1ee63b1b0b3645ad4e8e9e
parent89154d661a679ab22b6573da23f7c06de29ebde8
r8152: adjust the settings of ups flags

The UPS feature only works for runtime suspend, so UPS flags only
need to be set before enabling runtime suspend. Therefore, I create
a struct to record relative information, and use it before runtime
suspend.

All chips could record such information, even though not all of
them support the feature of UPS. Then, some functions could be
combined.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/r8152.c