Commit 8af28932 authored by C A Subramaniam's avatar C A Subramaniam Committed by Hari Kanigeri

SYSLINK NOTIFY Patch to cleanup notify_ducati module

Added the following changes
	- Removed array that was used to track ducati
	  driver objects.
	- Removed array introduced in syslink 2-0-0-12
	  migration to track notify driver.
	- Introduced a list implementation for tracking
	  notify objects.
	- Removed the index variable introduced in syslink
	  2-0-0-12 migration.
	- Re-organized notify_ducatidrv_create() function
	  call.
	- Added support for multiple creates to be called
	  with same driver name.
Signed-off-by: default avatarC A Subramaniam <subramaniam.ca@ti.com>
parent 985a9df8
......@@ -394,7 +394,6 @@ struct notify_driver_object {
struct notify_driver_attrs attrs;
u32 *disable_flag[NOTIFY_MAXNESTDEPTH];
void *driver_object;
int index;
};
......
......@@ -69,14 +69,13 @@ int notify_register_driver(char *driver_name,
if (strncmp(driver_name, drv_handle->name,
NOTIFY_MAX_NAMELEN) == 0) {
status = NOTIFY_E_ALREADYEXISTS;
break;
goto return_existing_handle;
}
}
if (drv_handle->is_init == NOTIFY_DRIVERINITSTATUS_NOTDONE) {
/* Found an empty slot, so block it. */
drv_handle->is_init =
NOTIFY_DRIVERINITSTATUS_INPROGRESS;
drv_handle->index = i;
status = NOTIFY_SUCCESS;
break;
}
......@@ -91,6 +90,8 @@ int notify_register_driver(char *driver_name,
memcpy(&(drv_handle->fn_table), fn_table,
sizeof(struct notify_interface));
drv_handle->driver_object = NULL;
return_existing_handle:
/*is_setup is set when driverInit is called. */
*driver_handle = drv_handle;
......
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