OSDN Git Service

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)
commit0e5b36bc4c1fccfc18dd851d960781589c16dae8
tree1702ed64d1d5a2703d1ee63b1b0b3645ad4e8e9e
parent5e5d8bc4a07319aa6961b6ee2d4813626e1fcf13
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