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

Commit 16fee6ee authored by Pratham Pratap's avatar Pratham Pratap
Browse files

extcon: Initialize blocking notifier while registering



This change initializes the blocking notifier while registering
a new extcon device. Without this a warning is observed when
CONFIG_LOCKDEP is enabled since it is not as per lockdep
annotation, as the driver is trying to register a non-static key.

Change-Id: Ibb20fe11c4622ffd92f02508ffae5a4fb5625019
Signed-off-by: default avatarPratham Pratap <prathampratap@codeaurora.org>
parent 5475cd6f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1324,8 +1324,10 @@ int extcon_dev_register(struct extcon_dev *edev)
		goto err_dev;
	}

	for (index = 0; index < edev->max_supported; index++)
	for (index = 0; index < edev->max_supported; index++) {
		RAW_INIT_NOTIFIER_HEAD(&edev->nh[index]);
		BLOCKING_INIT_NOTIFIER_HEAD(&edev->bnh[index]);
	}

	RAW_INIT_NOTIFIER_HEAD(&edev->nh_all);