fmc-eeprom: Maintain the reference count of the device.
With nvmem framework, the reference counter of the nvmem device is increased when we ask the device from the kernel via helper functions like "nvmem_device_find()", "nvmem_device_get()", etc. If reference count is zero, the driver can be unloaded (rmmod) during ongoing operations. Thus, the reference count should be incremented during add, and decremented during delete. Reported-by:Federico Vaga <federico.vaga@cern.ch> Signed-off-by:
Vaibhav Gupta <vaibhav.gupta@cern.ch>
Please register or sign in to comment