[PATCH v2 3/4] boards: qemu-virt: ensure board driver probe at postcore_initcall level

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Qemu board driver fixups should be applied very early to be able to
influence core components, even if they are controlled directly by
initcalls. For this reason, enforce probe of the driver at postcore_initcall
level.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
v1 -> v2:
  - new patch -- otherwise, probe happens after initcall adding rsa keys
---
 common/boards/qemu-virt/board.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/common/boards/qemu-virt/board.c b/common/boards/qemu-virt/board.c
index d0f4412cdea5..ec92ae94aec9 100644
--- a/common/boards/qemu-virt/board.c
+++ b/common/boards/qemu-virt/board.c
@@ -65,4 +65,14 @@ static struct driver virt_board_driver = {
 	.of_compatible = virt_of_match,
 };
 
-postcore_platform_driver(virt_board_driver);
+static int virt_board_driver_init(void)
+{
+	int ret;
+
+	ret = platform_driver_register(&virt_board_driver);
+	if (ret)
+		return ret;
+
+	return of_devices_ensure_probed_by_dev_id(virt_of_match);
+}
+postcore_initcall(virt_board_driver_init);
-- 
2.30.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux