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

Commit b56c8409 authored by Bhaumik Bhatt's avatar Bhaumik Bhatt Committed by Hemant Kumar
Browse files

mhi: core: create sysfs nodes before devices



Sysfs nodes should be created before devices as there is no
dependency and reverse order is maintained in device removals.

Change-Id: Ie8c9bb7323a89a1d76d5b016d6060ff9370e03a3
Signed-off-by: default avatarBhaumik Bhatt <bbhatt@codeaurora.org>
parent 93566331
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. */
/* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. */

#include <linux/debugfs.h>
#include <linux/delay.h>
@@ -521,14 +521,14 @@ static int mhi_pm_mission_mode_transition(struct mhi_controller *mhi_cntrl)
	if (MHI_REG_ACCESS_VALID(mhi_cntrl->pm_state))
		mhi_timesync_log(mhi_cntrl);

	/* setup sysfs nodes for userspace votes */
	mhi_create_sysfs(mhi_cntrl);

	MHI_LOG("Adding new devices\n");

	/* add supported devices */
	mhi_create_devices(mhi_cntrl);

	/* setup sysfs nodes for userspace votes */
	mhi_create_sysfs(mhi_cntrl);

	read_lock_bh(&mhi_cntrl->pm_lock);

error_mission_mode: