]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipa: use refcount_t for IPA clock reference count
authorAlex Elder <elder@linaro.org>
Thu, 17 Sep 2020 17:39:20 +0000 (12:39 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 19 Sep 2020 00:47:07 +0000 (17:47 -0700)
commit5fe49ec537a79f1ea3364ffc9b1dc7eed1042a64
treed53482ce68587e3f06120e41e75e583cfc35c7fe
parent95d936748cd1fa2610d8d2fdee7d2824a07b5f17
net: ipa: use refcount_t for IPA clock reference count

Take advantage of the checking provided by refcount_t, rather than
using a plain atomic to represent the IPA clock reference count.

Note that we need to *set* the value to 1 in ipa_clock_get() rather
than incrementing it from 0 (because doing that is considered an
error for a refcount_t).

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