Skip to content
Snippets Groups Projects
Commit c59033d1 authored by Dima Zavin's avatar Dima Zavin
Browse files

ARM: msm: only create rpcrouter pdev once


Change-Id: I1e3bebe50c93eb4c4874d35d1c87ebafa4f88af5
Signed-off-by: default avatarDima Zavin <dima@android.com>
parent aae2d66b
No related branches found
No related tags found
No related merge requests found
...@@ -111,6 +111,7 @@ static void do_create_rpcrouter_pdev(struct work_struct *work); ...@@ -111,6 +111,7 @@ static void do_create_rpcrouter_pdev(struct work_struct *work);
static DECLARE_WORK(work_read_data, do_read_data); static DECLARE_WORK(work_read_data, do_read_data);
static DECLARE_WORK(work_create_pdevs, do_create_pdevs); static DECLARE_WORK(work_create_pdevs, do_create_pdevs);
static DECLARE_WORK(work_create_rpcrouter_pdev, do_create_rpcrouter_pdev); static DECLARE_WORK(work_create_rpcrouter_pdev, do_create_rpcrouter_pdev);
static atomic_t rpcrouter_pdev_created = ATOMIC_INIT(0);
#define RR_STATE_IDLE 0 #define RR_STATE_IDLE 0
#define RR_STATE_HEADER 1 #define RR_STATE_HEADER 1
...@@ -517,6 +518,7 @@ static int process_control_msg(union rr_control_msg *msg, int len) ...@@ -517,6 +518,7 @@ static int process_control_msg(union rr_control_msg *msg, int len)
static void do_create_rpcrouter_pdev(struct work_struct *work) static void do_create_rpcrouter_pdev(struct work_struct *work)
{ {
if (atomic_cmpxchg(&rpcrouter_pdev_created, 0, 1) == 0)
platform_device_register(&rpcrouter_pdev); platform_device_register(&rpcrouter_pdev);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment