diff options
author | Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com> | 2023-09-01 10:10:37 -0600 |
---|---|---|
committer | Jeffrey Hugo <quic_jhugo@quicinc.com> | 2023-09-15 09:29:25 -0600 |
commit | 1006d67413d72d8cb70e18b02f4072ed06efb29d (patch) | |
tree | 8d6d75981b48624ebed69bdaaec8ea2e7e41dad5 /drivers/accel | |
parent | 81995ee1620318b4c7bbeb02bcc372da2c078c76 (diff) | |
download | linux-1006d67413d72d8cb70e18b02f4072ed06efb29d.tar.gz linux-1006d67413d72d8cb70e18b02f4072ed06efb29d.tar.bz2 linux-1006d67413d72d8cb70e18b02f4072ed06efb29d.zip |
accel/qaic: Register for PCI driver at the beginning of module init
As qaic drivers base device is connected to host via PCI framework, it
makes sense to register in PCI framework at the beginning of module
init.
Signed-off-by: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
Reviewed-by: Carl Vanderlip <quic_carlv@quicinc.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230901161037.6124-1-quic_jhugo@quicinc.com
Diffstat (limited to 'drivers/accel')
-rw-r--r-- | drivers/accel/qaic/qaic_drv.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/accel/qaic/qaic_drv.c b/drivers/accel/qaic/qaic_drv.c index b5de82e6eb4d..49b5039f4cad 100644 --- a/drivers/accel/qaic/qaic_drv.c +++ b/drivers/accel/qaic/qaic_drv.c @@ -591,22 +591,22 @@ static int __init qaic_init(void) { int ret; - ret = mhi_driver_register(&qaic_mhi_driver); + ret = pci_register_driver(&qaic_pci_driver); if (ret) { - pr_debug("qaic: mhi_driver_register failed %d\n", ret); + pr_debug("qaic: pci_register_driver failed %d\n", ret); return ret; } - ret = pci_register_driver(&qaic_pci_driver); + ret = mhi_driver_register(&qaic_mhi_driver); if (ret) { - pr_debug("qaic: pci_register_driver failed %d\n", ret); - goto free_mhi; + pr_debug("qaic: mhi_driver_register failed %d\n", ret); + goto free_pci; } return 0; -free_mhi: - mhi_driver_unregister(&qaic_mhi_driver); +free_pci: + pci_unregister_driver(&qaic_pci_driver); return ret; } @@ -628,8 +628,8 @@ static void __exit qaic_exit(void) * reinitializing the link_up state after the cleanup is done. */ link_up = true; - pci_unregister_driver(&qaic_pci_driver); mhi_driver_unregister(&qaic_mhi_driver); + pci_unregister_driver(&qaic_pci_driver); } module_init(qaic_init); |