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

Commit 561f8fa7 authored by Michael Adisumarta's avatar Michael Adisumarta Committed by Gerrit - the friendly Code Review server
Browse files

msm: ipa4: fix PM register on USB



USB uses 2 PM resources, one for TETH and one for DPL.
This changes creating a single PM resource for TETH.

CRs-fixed: 2182844
Change-Id: Ic5a728667416f8c4d340b46c8885f6554fd5ab0f
Signed-off-by: default avatarMichael Adisumarta <madisuma@codeaurora.org>
parent 33ba9737
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
/* Copyright (c) 2015-2017 The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2018 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
@@ -741,10 +741,6 @@ static int ipa3_usb_register_pm(enum ipa3_usb_transport_type ttype)
		&ipa3_usb_ctx->ttype_ctx[ttype];
	int result;

	/* create PM resources for the first tethering protocol only */
	if (ipa3_usb_ctx->num_init_prot > 0)
		return 0;

	memset(&ttype_ctx->pm_ctx.reg_params, 0,
		sizeof(ttype_ctx->pm_ctx.reg_params));
	ttype_ctx->pm_ctx.reg_params.name = (ttype == IPA_USB_TRANSPORT_DPL) ?
@@ -2455,9 +2451,11 @@ int ipa_usb_deinit_teth_prot(enum ipa_usb_teth_prot teth_prot)
	if (IPA3_USB_IS_TTYPE_DPL(ttype) ||
		(ipa3_usb_ctx->num_init_prot == 0)) {
		if (!ipa3_usb_set_state(IPA_USB_INVALID, false, ttype))
			IPA_USB_ERR("failed to change state to invalid\n");
			IPA_USB_ERR(
				"failed to change state to invalid\n");
		if (ipa_pm_is_used()) {
			ipa3_usb_deregister_pm(ttype);
			ipa3_usb_ctx->ttype_ctx[ttype].ipa_usb_notify_cb = NULL;
		} else {
			ipa_rm_delete_resource(
			ipa3_usb_ctx->ttype_ctx[ttype].rm_ctx.prod_params.name);