When coresight device is in an active session, driver module of
that device should not be removed. Use try_get_module() in
coresight_grab_device() to prevent module to be unloaded.
Use get_device()/put_device() to protect device data
in the middle of active session.
Signed-off-by: Tingwei Zhang <tingwei@xxxxxxxxxxxxxx>
Tested-by: Mike Leach <mike.leach@xxxxxxxxxx>
Suggested-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>