Commits
Suman Anna committed 515add9bf34
rpmsg: rpc: maintain a reference device pointer per open fd The remote processor recovery process includes the deletion and recreation of an rpmsg-rpc device. The representative rppc_device structure is retained and reused if there are any open applications using the exposed character device. The underlying device pointer for a rppc_device is though deleted and recreated and is asynchronous to any of the operations on the exposed character device. A reference to this device pointer is to be maintained therefore for each open application so that it can be used during regular fops and until the file descriptor is closed instead of referencing the rppc_device's dev pointer, which can become NULL at any point due to a recovery process. The actual memory of the rppc_device's dev pointer deleted in the driver's .remove() is freed when all the open applications have closed either gracefully or forcefully. Any new applications after a recovery will leverage a newly created device pointer. Signed-off-by: Suman Anna <s-anna@ti.com>