static int __devinit hs_rpc_init(void)
{
	int rc;

	rc = hs_rpc_cb_init();
	if (rc) {
		pr_err("%s: failed to initialize rpc client, try server...\n",
						__func__);
		}
		rc = msm_rpc_create_server(&hs_rpc_server);
		if (rc) {
			pr_err("%s: failed to create rpc server\n", __func__);
			return rc;
		}
	
	rpc_svc_p = msm_rpc_connect_compatible(HS_RPC_PROG,HS_RPC_VERS_1,0);

	if(IS_ERR(rpc_svc_p)) {
		pr_err("%s: couldn't connect compatible rpc client err %ld\n", __func__,
			 PTR_ERR(rpc_svc_p));
		rpc_svc_p = msm_rpc_connect_compatible(HS_RPC_PROG,HS_RPC_VERS_2,0);
	}

	if(IS_ERR(rpc_svc_p)) {
		pr_err("%s: couldn't connect compatible rpc client err %ld\n", __func__,
			 PTR_ERR(rpc_svc_p));
		return PTR_ERR(rpc_svc_p);
	}

	return rc;
}
static int __devinit hs_rpc_init(void)
{
	int rc;

	rc = hs_rpc_cb_init();

#if defined(CONFIG_MACH_LGE) && !defined(CONFIG_MACH_MSM7X27_SWIFT)
	if (rc) {
		pr_err("%s: failed to initialize rpc client\n", __func__);
		return rc;
	}

	rc = msm_rpc_create_server(&hs_rpc_server);
	if (rc)
		pr_err("%s: failed to create rpc server\n", __func__);
#else
	if (rc) {
		pr_err("%s: failed to initialize rpc client, try server...\n",
						__func__);

		rc = msm_rpc_create_server(&hs_rpc_server);
		if (rc) {
			pr_err("%s: failed to create rpc server\n", __func__);
			return rc;
		}
	}
#endif

	return rc;
}
static int __devinit hs_rpc_init(void)
{
	int rc;

	rc = hs_rpc_cb_init();
	if (rc)
		pr_err("%s: failed to initialize rpc client\n", __func__);

	rc = msm_rpc_create_server(&hs_rpc_server);
	if (rc < 0)
		pr_err("%s: failed to create rpc server\n", __func__);

	return 0;
}
static int hs_rpc_init(void)
{
	int rc;

	rc = hs_rpc_cb_init();
	if (rc) {
		pr_err("%s: failed to initialize rpc client, try server...\n",
						__func__);

		rc = msm_rpc_create_server(&hs_rpc_server);
		if (rc) {
			pr_err("%s: failed to create rpc server\n", __func__);
			return rc;
		}
	}

	return rc;
}
static int __devinit hs_rpc_init(void)
{
	int rc;

	rc = hs_rpc_cb_init();
	if (rc) {
		pr_err("%s: failed to initialize rpc client, try server...\n",
						__func__);

		}	//LHX_PM_20110105_01 match for AMSS 
		rc = msm_rpc_create_server(&hs_rpc_server);
		if (rc) {
			pr_err("%s: failed to create rpc server\n", __func__);
			return rc;
		}

	return rc;
}
static int __devinit hs_rpc_init(void)
{
	int rc;

	if (machine_is_msm7x27_surf() || machine_is_msm7x27_ffa() ||
		machine_is_qsd8x50_surf() || machine_is_qsd8x50_ffa() ||
		machine_is_msm7x30_surf() || machine_is_msm7x30_ffa()) {
		rc = hs_rpc_cb_init();
		if (rc)
			pr_err("%s: failed to initialize\n", __func__);
	}

	rc = msm_rpc_create_server(&hs_rpc_server);
	if (rc < 0)
		pr_err("%s: failed to create rpc server\n", __func__);

	return 0;
}
static int __devinit hs_rpc_init(void)
{
	int rc;

	rc = hs_rpc_cb_init();

//#ifdef CONFIG_MACH_LGE
#if 0
	/* FIXME: following code is from qualcomm's 2.6.32 kernel
	 * in qualcomm's original code in 7020 version,
	 * rpc server of handset can't be created in any case.
	 * so, power key event is never passed from arm9.
	 * this comes from fact that hs_rpc_cb_init() always returns '0'
	 * and subsequently msm_rpc_create_server() is never called.
	 * this is obvious qualcomm's bug.
	 * I expect that qualcomm fix this bug later.
	 * 2010-11-18, [email protected]
	 */
	if (rc) {
		pr_err("%s: failed to initialize rpc client\n", __func__);
		return rc;
	}

	rc = msm_rpc_create_server(&hs_rpc_server);
	if (rc)
		pr_err("%s: failed to create rpc server\n", __func__);
#else
	if (rc) {
		pr_err("%s: failed to initialize rpc client, try server...\n",
						__func__);

		rc = msm_rpc_create_server(&hs_rpc_server);
		if (rc) {
			pr_err("%s: failed to create rpc server\n", __func__);
			return rc;
		}
	}
#endif

	return rc;
}