OSDN Git Service

net: ipa: don't hold clock reference while netdev open
authorAlex Elder <elder@linaro.org>
Thu, 12 Aug 2021 19:50:35 +0000 (14:50 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 14 Aug 2021 13:13:39 +0000 (14:13 +0100)
commit8dc181f2cd621e8eaa3d9d432e5ebf0175244c4a
tree62ad23e8e0a0ea4f719b8d6f86ebc6816a4e6832
parent8dcf8bb30f17d4ac1233be877c1650c5a1b34ca8
net: ipa: don't hold clock reference while netdev open

Currently a clock reference is taken whenever the ->ndo_open
callback for the modem netdev is called.  That reference is dropped
when the device is closed, in ipa_stop().

We no longer need this, because ipa_start_xmit() now handles the
situation where the hardware power state is not active.

Drop the clock reference in ipa_open() when we're done, and take a
new reference in ipa_stop() before we begin closing the interface.

Finally (and unrelated, but trivial), change the return type of
ipa_start_xmit() to be netdev_tx_t instead of int.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipa/ipa_modem.c