mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
nvmem: change the signature of nvmem_unregister()
We switched the nvmem framework to using kref instead of manually checking the current number of users in nvmem_unregister() so this function can no longer fail. We also converted all remaining users that still checked the return value of nvmem_unregister() to using devm_nvmem_register(). Make the routine return void. Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
7d9f9f24fa
commit
bf58e8820c
2 changed files with 5 additions and 12 deletions
|
|
@ -553,20 +553,16 @@ static void nvmem_device_release(struct kref *kref)
|
|||
* nvmem_unregister() - Unregister previously registered nvmem device
|
||||
*
|
||||
* @nvmem: Pointer to previously registered nvmem device.
|
||||
*
|
||||
* Return: Will be an negative on error or a zero on success.
|
||||
*/
|
||||
int nvmem_unregister(struct nvmem_device *nvmem)
|
||||
void nvmem_unregister(struct nvmem_device *nvmem)
|
||||
{
|
||||
kref_put(&nvmem->refcnt, nvmem_device_release);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(nvmem_unregister);
|
||||
|
||||
static void devm_nvmem_release(struct device *dev, void *res)
|
||||
{
|
||||
WARN_ON(nvmem_unregister(*(struct nvmem_device **)res));
|
||||
nvmem_unregister(*(struct nvmem_device **)res);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue