|
@@ -1,6 +1,6 @@
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
/*
|
|
- * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
|
|
|
|
|
|
+ * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
|
|
*/
|
|
*/
|
|
|
|
|
|
#include "cam_req_mgr_workq.h"
|
|
#include "cam_req_mgr_workq.h"
|
|
@@ -88,7 +88,7 @@ static int cam_req_mgr_process_task(struct crm_workq_task *task)
|
|
* cam_req_mgr_process_workq() - main loop handling
|
|
* cam_req_mgr_process_workq() - main loop handling
|
|
* @w: workqueue task pointer
|
|
* @w: workqueue task pointer
|
|
*/
|
|
*/
|
|
-static void cam_req_mgr_process_workq(struct work_struct *w)
|
|
|
|
|
|
+void cam_req_mgr_process_workq(struct work_struct *w)
|
|
{
|
|
{
|
|
struct cam_req_mgr_core_workq *workq = NULL;
|
|
struct cam_req_mgr_core_workq *workq = NULL;
|
|
struct crm_workq_task *task;
|
|
struct crm_workq_task *task;
|
|
@@ -172,7 +172,7 @@ end:
|
|
|
|
|
|
int cam_req_mgr_workq_create(char *name, int32_t num_tasks,
|
|
int cam_req_mgr_workq_create(char *name, int32_t num_tasks,
|
|
struct cam_req_mgr_core_workq **workq, enum crm_workq_context in_irq,
|
|
struct cam_req_mgr_core_workq **workq, enum crm_workq_context in_irq,
|
|
- int flags)
|
|
|
|
|
|
+ int flags, void (*func)(struct work_struct *w))
|
|
{
|
|
{
|
|
int32_t i, wq_flags = 0, max_active_tasks = 0;
|
|
int32_t i, wq_flags = 0, max_active_tasks = 0;
|
|
struct crm_workq_task *task;
|
|
struct crm_workq_task *task;
|
|
@@ -202,7 +202,7 @@ int cam_req_mgr_workq_create(char *name, int32_t num_tasks,
|
|
}
|
|
}
|
|
|
|
|
|
/* Workq attributes initialization */
|
|
/* Workq attributes initialization */
|
|
- INIT_WORK(&crm_workq->work, cam_req_mgr_process_workq);
|
|
|
|
|
|
+ INIT_WORK(&crm_workq->work, func);
|
|
spin_lock_init(&crm_workq->lock_bh);
|
|
spin_lock_init(&crm_workq->lock_bh);
|
|
CAM_DBG(CAM_CRM, "LOCK_DBG workq %s lock %pK",
|
|
CAM_DBG(CAM_CRM, "LOCK_DBG workq %s lock %pK",
|
|
name, &crm_workq->lock_bh);
|
|
name, &crm_workq->lock_bh);
|