static int __devinit npa_rpc_init_probe(struct platform_device *pdev) { struct work_struct *work = NULL; if (pdev->id != (NPA_REMOTEVERS & RPC_VERSION_MAJOR_MASK)) return -EINVAL; npa_rpc_client = msm_rpc_register_client2("npa-remote-client", NPA_REMOTEPROG, NPA_REMOTEVERS, 1, npa_remote_cb_fn); if (IS_ERR(npa_rpc_client)) { pr_err("NPA REMOTE: RPC client creation failed\n"); return -ENODEV; } /* Schedule a work to initialize NPA remoting. */ work = kzalloc(sizeof(struct work_struct), GFP_KERNEL); if (!work) return -ENOMEM; INIT_WORK(work, npa_remote_verify); queue_work(npa_rpc_wq, work); return 0; }
struct msm_rpc_client *oem_rapi_client_init(void) { mutex_lock(&oem_rapi_client_lock); if (open_count == 0) { rpc_client = msm_rpc_register_client2("oemrapiclient", OEM_RAPI_PROG, OEM_RAPI_VERS, 0, oem_rapi_client_cb); if (!IS_ERR(rpc_client)) open_count++; } mutex_unlock(&oem_rapi_client_lock); return rpc_client; }
static struct msm_rpc_client *ping_mdm_init(void) { mutex_lock(&ping_mdm_lock); if (open_count == 0) { rpc_client = msm_rpc_register_client2("pingdef", PING_MDM_PROG, PING_MDM_VERS, 1, ping_mdm_cb_func); if (!IS_ERR(rpc_client)) open_count++; } mutex_unlock(&ping_mdm_lock); return rpc_client; }
static int dog_keepalive_init_probe(struct platform_device *pdev) { DBG("%s: probe called\n", __func__); dog_keepalive_rpc_client = msm_rpc_register_client2( "dog-keepalive", DOG_KEEPALIVE_PROG, DOG_KEEPALIVE_VERS, 0, dog_keepalive_cb_func); if (IS_ERR(dog_keepalive_rpc_client)) { pr_err("%s: RPC client creation failed\n", __func__); return PTR_ERR(dog_keepalive_rpc_client); } dog_keepalive_register(); return 0; }