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

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

Merge "usb_bam: Fix BUG in HSIC remove making pm usage_count negative"

parents 6ef23b55 cc54a032
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -232,12 +232,14 @@ void msm_bam_set_hsic_host_dev(struct device *dev)
		pr_debug("%s: Getting hsic device %p\n", __func__, dev);
		pm_runtime_get(dev);
	} else if (host_info[HSIC_CTRL].dev) {
		pr_debug("%s: Putting hsic device %p\n", __func__,
			host_info[HSIC_CTRL].dev);
		/* Just free previous device*/
		pr_debug("%s: Try Putting hsic device %p, lpm:%d\n", __func__,
			host_info[HSIC_CTRL].dev, info[HSIC_CTRL].in_lpm);
		/* Just release previous device if not already done */
		if (!info[HSIC_CTRL].in_lpm) {
			info[HSIC_CTRL].in_lpm = true;
			pm_runtime_put(host_info[HSIC_CTRL].dev);
		}
	}

	host_info[HSIC_CTRL].dev = dev;
	host_info[HSIC_CTRL].in_lpm = false;