qseecom: Remove the dead code from driver

For kernel clients, some of the flags are maintained which is not required
as those are specific to userspace clients. So remove the code which is
not required.

Change-Id: If7fb51cc17e9a8c0f3c2632e9c42d84489bda4f6
Signed-off-by: Mallikarjuna Reddy Amireddy <mamire@codeaurora.org>
This commit is contained in:
AnilKumar Chimata 2016-02-04 17:54:12 +05:30 committed by Gerrit - the friendly Code Review server
parent c18c2d2aaf
commit efea51e084

View file

@ -3373,7 +3373,6 @@ int qseecom_start_app(struct qseecom_handle **handle,
data->client.ihandle = NULL;
init_waitqueue_head(&data->abort_wq);
atomic_set(&data->ioctl_count, 0);
data->client.ihandle = ion_alloc(qseecom.ion_clnt, size, 4096,
ION_HEAP(ION_QSECOM_HEAP_ID), 0);
@ -3497,7 +3496,6 @@ int qseecom_shutdown_app(struct qseecom_handle **handle)
}
data = (struct qseecom_dev_handle *) ((*handle)->dev);
mutex_lock(&app_access_lock);
atomic_inc(&data->ioctl_count);
spin_lock_irqsave(&qseecom.registered_kclient_list_lock, flags);
list_for_each_entry(kclient, &qseecom.registered_kclient_list_head,
@ -3514,25 +3512,6 @@ int qseecom_shutdown_app(struct qseecom_handle **handle)
else
ret = qseecom_unload_app(data, false);
if (qseecom.support_bus_scaling) {
mutex_lock(&qsee_bw_mutex);
if (data->mode != INACTIVE) {
qseecom_unregister_bus_bandwidth_needs(data);
if (qseecom.cumulative_mode == INACTIVE) {
ret = __qseecom_set_msm_bus_request(INACTIVE);
if (ret)
pr_err("Fail to scale down bus\n");
}
}
mutex_unlock(&qsee_bw_mutex);
} else {
if (data->fast_load_enabled == true)
qsee_disable_clock_vote(data, CLK_SFPB);
if (data->perf_enabled == true)
qsee_disable_clock_vote(data, CLK_DFAB);
}
atomic_dec(&data->ioctl_count);
mutex_unlock(&app_access_lock);
if (ret == 0) {
kzfree(data);
@ -3568,12 +3547,10 @@ int qseecom_send_command(struct qseecom_handle *handle, void *send_buf,
return -EINVAL;
mutex_lock(&app_access_lock);
atomic_inc(&data->ioctl_count);
if (qseecom.support_bus_scaling) {
ret = qseecom_scale_bus_bandwidth_timer(INACTIVE);
if (ret) {
pr_err("Failed to set bw.\n");
atomic_dec(&data->ioctl_count);
mutex_unlock(&app_access_lock);
return ret;
}
@ -3591,7 +3568,6 @@ int qseecom_send_command(struct qseecom_handle *handle, void *send_buf,
if (ret) {
pr_err("Failed to vote for clock with err %d\n",
ret);
atomic_dec(&data->ioctl_count);
mutex_unlock(&app_access_lock);
return -EINVAL;
}
@ -3608,7 +3584,6 @@ int qseecom_send_command(struct qseecom_handle *handle, void *send_buf,
qsee_disable_clock_vote(data, CLK_SFPB);
}
atomic_dec(&data->ioctl_count);
mutex_unlock(&app_access_lock);
if (ret)
@ -3633,8 +3608,6 @@ int qseecom_set_bandwidth(struct qseecom_handle *handle, bool high)
__qseecom_register_bus_bandwidth_needs(handle->dev,
HIGH);
mutex_unlock(&qsee_bw_mutex);
if (ret)
pr_err("Failed to scale bus (med) %d\n", ret);
} else {
ret = qseecom_perf_enable(handle->dev);
if (ret)