Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4727b4ff authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "profiler: Add referance count for profiler's STOP command"

parents e539a094 008d58f0
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@

static struct class *driver_class;
static dev_t profiler_device_no;
static int stop_done = 1;

struct profiler_control {

@@ -212,6 +213,10 @@ static int bw_profiling_stop(struct tz_bw_svc_buf *bwbuf)
{
	struct tz_bw_svc_stop_req *bwstopreq = NULL;

	if (stop_done) {
		stop_done--;
		return 0;
	}
	bwstopreq = (struct tz_bw_svc_stop_req *) &bwbuf->bwreq;
	/* Populate request data */
	bwstopreq->cmd_id = TZ_BW_SVC_STOP_ID;
@@ -253,6 +258,7 @@ static int profiler_get_bw_info(void __user *argp)
		ret = bw_profiling_stop(bwbuf);
		if (ret)
			pr_err("bw_profiling_stop Failed with ret: %d\n", ret);
		stop_done++;
		break;
	}
	default: