commit | c1de7f43bd84271e438a4f2dadc4ba9a353baaea | [log] [tgz] |
---|---|---|
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | Fri Sep 21 06:40:08 2018 -0700 |
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | Fri Sep 28 15:14:54 2018 +0200 |
tree | f08b22fddaa52f2d55f6b2cb34bacc936e8838a9 | |
parent | fa72d847d68d7833b77a4bef944cf2c5baf56f49 [diff] |
nvmem: use kref Use kref for reference counting. Use an approach similar to the one seen in the common clock subsystem: don't actually destroy the nvmem device until the last user puts it. This way we can get rid of the users check from nvmem_unregister(). Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>