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: Pratham Pratap <prathampratap@codeaurora.org>
This commit is contained in:
@@ -1324,8 +1324,10 @@ int extcon_dev_register(struct extcon_dev *edev)
|
|||||||
goto err_dev;
|
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]);
|
RAW_INIT_NOTIFIER_HEAD(&edev->nh[index]);
|
||||||
|
BLOCKING_INIT_NOTIFIER_HEAD(&edev->bnh[index]);
|
||||||
|
}
|
||||||
|
|
||||||
RAW_INIT_NOTIFIER_HEAD(&edev->nh_all);
|
RAW_INIT_NOTIFIER_HEAD(&edev->nh_all);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user