Commit 029c3a69 authored by Ramesh Gupta's avatar Ramesh Gupta Committed by Hari Kanigeri

OMAP4 Tesla use kernel bitops functions

Use kernel bit operation functions instead of
custom defined.
Signed-off-by: default avatarRamesh Gupta G <grgupta@ti.com>
parent 8cf5cf6c
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/module.h> #include <linux/module.h>
#include <syslink/_bitops.h>
#include <syslink/notify_driver.h> #include <syslink/notify_driver.h>
#include <syslink/notifydefs.h> #include <syslink/notifydefs.h>
#include <syslink/notify_driverdefs.h> #include <syslink/notify_driverdefs.h>
...@@ -231,7 +230,6 @@ struct notify_driver_object *notify_tesladrv_create(char *driver_name, ...@@ -231,7 +230,6 @@ struct notify_driver_object *notify_tesladrv_create(char *driver_name,
int proc_id; int proc_id;
int i; int i;
unsigned long int num_events = NOTIFYNONSHMDRV_MAX_EVENTS; unsigned long int num_events = NOTIFYNONSHMDRV_MAX_EVENTS;
struct mbox_config *mbox_hw_config; struct mbox_config *mbox_hw_config;
int mbox_module_no; int mbox_module_no;
int interrupt_no; int interrupt_no;
...@@ -692,9 +690,9 @@ int notify_tesladrv_register_event( ...@@ -692,9 +690,9 @@ int notify_tesladrv_register_event(
} }
if (done) { if (done) {
SET_BIT(ctrl_ptr->proc_ctrl[driver_object->self_id]. set_bit(event_no, (unsigned long *)
reg_mask.mask, &ctrl_ptr->proc_ctrl[driver_object->self_id].
event_no); reg_mask.mask);
} else { } else {
/*! @retval NOTIFY_E_MAXEVENTS Maximum number of /*! @retval NOTIFY_E_MAXEVENTS Maximum number of
supported events have already been registered. */ supported events have already been registered. */
...@@ -769,8 +767,9 @@ int notify_tesladrv_unregister_event( ...@@ -769,8 +767,9 @@ int notify_tesladrv_unregister_event(
if (list_empty((struct list_head *) if (list_empty((struct list_head *)
&event_list[event_no].listeners) == true) { &event_list[event_no].listeners) == true) {
CLEAR_BIT(ctrl_ptr->proc_ctrl[driver_object->self_id].reg_mask. clear_bit(event_no, (unsigned long *)
mask, event_no); &ctrl_ptr->proc_ctrl[driver_object->self_id].
reg_mask.mask);
self_event_chart = ctrl_ptr->proc_ctrl[driver_object->self_id]. self_event_chart = ctrl_ptr->proc_ctrl[driver_object->self_id].
self_event_chart; self_event_chart;
/* Clear any pending unserviced event as there are no /* Clear any pending unserviced event as there are no
...@@ -890,8 +889,9 @@ int notify_tesladrv_disable_event( ...@@ -890,8 +889,9 @@ int notify_tesladrv_disable_event(
WARN_ON(mutex_lock_interruptible(notify_tesladriver_state.gate_handle) WARN_ON(mutex_lock_interruptible(notify_tesladriver_state.gate_handle)
!= 0); != 0);
CLEAR_BIT(driver_object->ctrl_ptr->proc_ctrl[driver_object->self_id]. clear_bit(event_no, (unsigned long *)
reg_mask.enable_mask, event_no); &driver_object->ctrl_ptr->proc_ctrl[driver_object->self_id].
reg_mask.enable_mask);
/* Leave critical section protection. */ /* Leave critical section protection. */
mutex_unlock(notify_tesladriver_state.gate_handle); mutex_unlock(notify_tesladriver_state.gate_handle);
return status; return status;
...@@ -914,8 +914,9 @@ int notify_tesladrv_enable_event(struct notify_driver_object *handle, ...@@ -914,8 +914,9 @@ int notify_tesladrv_enable_event(struct notify_driver_object *handle,
WARN_ON(mutex_lock_interruptible(notify_tesladriver_state.gate_handle) WARN_ON(mutex_lock_interruptible(notify_tesladriver_state.gate_handle)
!= 0); != 0);
SET_BIT(driver_object->ctrl_ptr->proc_ctrl[driver_object->self_id]. set_bit(event_no, (unsigned long *)
reg_mask.enable_mask, event_no); &driver_object->ctrl_ptr->proc_ctrl[driver_object->self_id].
reg_mask.enable_mask);
mutex_unlock(notify_tesladriver_state.gate_handle); mutex_unlock(notify_tesladriver_state.gate_handle);
return status; return status;
...@@ -967,8 +968,8 @@ static void notify_tesladrv_isr(void *ref_data) ...@@ -967,8 +968,8 @@ static void notify_tesladrv_isr(void *ref_data)
do { do {
event_no = reg_chart[i].reg_event_no; event_no = reg_chart[i].reg_event_no;
if (event_no != (unsigned long int) -1) { if (event_no != (unsigned long int) -1) {
if (TEST_BIT(ctrl_ptr->reg_mask.enable_mask, if (test_bit(event_no, (unsigned long *)
event_no) == 1) { &ctrl_ptr->reg_mask.enable_mask) == 1) {
mbx_ret_val = ntfy_disp_read(mbox_module_no, mbx_ret_val = ntfy_disp_read(mbox_module_no,
NOTIFYDRV_TESLA_RECV_MBX, NOTIFYDRV_TESLA_RECV_MBX,
&payload, &payload,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment