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

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

Merge "diag: Add support for voting active mask in callback mode"

parents 470a55b4 9a3e4802
Loading
Loading
Loading
Loading
+14 −14
Original line number Diff line number Diff line
/* Copyright (c) 2008-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2008-2015, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -896,19 +896,6 @@ static int diag_switch_logging(int requested_mode)
					driver->logging_mode);
		return 0;
	}

	if (requested_mode != MEMORY_DEVICE_MODE)
		diag_update_real_time_vote(DIAG_PROC_MEMORY_DEVICE,
					   MODE_REALTIME, ALL_PROC);
	else
		diag_update_proc_vote(DIAG_PROC_MEMORY_DEVICE, VOTE_UP,
				      ALL_PROC);

	if (!(requested_mode == MEMORY_DEVICE_MODE &&
					driver->logging_mode == USB_MODE))
		queue_work(driver->diag_real_time_wq,
						&driver->diag_real_time_work);

	mutex_lock(&driver->diagchar_mutex);
	temp = driver->logging_mode;
	driver->logging_mode = requested_mode;
@@ -948,6 +935,19 @@ static int diag_switch_logging(int requested_mode)
	}

	driver->logging_process_id = current->tgid;
	if (driver->logging_mode != MEMORY_DEVICE_MODE) {
		diag_update_real_time_vote(DIAG_PROC_MEMORY_DEVICE,
						MODE_REALTIME, ALL_PROC);
	} else {
		diag_update_proc_vote(DIAG_PROC_MEMORY_DEVICE, VOTE_UP,
						ALL_PROC);
	}

	if (!(driver->logging_mode == MEMORY_DEVICE_MODE &&
					temp == USB_MODE))
		queue_work(driver->diag_real_time_wq,
						&driver->diag_real_time_work);

	status = diag_mux_switch_logging(new_mode);
	if (status) {
		if (requested_mode == MEMORY_DEVICE_MODE)