All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] accel/qaic: Register for PCI driver at the beginning of module init
@ 2023-09-01 16:10 ` Jeffrey Hugo
  0 siblings, 0 replies; 6+ messages in thread
From: Jeffrey Hugo @ 2023-09-01 16:10 UTC (permalink / raw)
  To: quic_carlv, quic_pkanojiy, stanislaw.gruszka
  Cc: ogabbay, linux-arm-msm, dri-devel, Jeffrey Hugo

From: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>

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>
---
 drivers/accel/qaic/qaic_drv.c | 16 ++++++++--------
 1 file 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);
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] accel/qaic: Register for PCI driver at the beginning of module init
@ 2023-09-01 16:10 ` Jeffrey Hugo
  0 siblings, 0 replies; 6+ messages in thread
From: Jeffrey Hugo @ 2023-09-01 16:10 UTC (permalink / raw)
  To: quic_carlv, quic_pkanojiy, stanislaw.gruszka
  Cc: linux-arm-msm, ogabbay, Jeffrey Hugo, dri-devel

From: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>

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>
---
 drivers/accel/qaic/qaic_drv.c | 16 ++++++++--------
 1 file 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);
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] accel/qaic: Register for PCI driver at the beginning of module init
  2023-09-01 16:10 ` Jeffrey Hugo
@ 2023-09-04  9:12   ` Stanislaw Gruszka
  -1 siblings, 0 replies; 6+ messages in thread
From: Stanislaw Gruszka @ 2023-09-04  9:12 UTC (permalink / raw)
  To: Jeffrey Hugo; +Cc: quic_carlv, quic_pkanojiy, ogabbay, linux-arm-msm, dri-devel

On Fri, Sep 01, 2023 at 10:10:37AM -0600, Jeffrey Hugo wrote:
> From: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
> 
> 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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] accel/qaic: Register for PCI driver at the beginning of module init
@ 2023-09-04  9:12   ` Stanislaw Gruszka
  0 siblings, 0 replies; 6+ messages in thread
From: Stanislaw Gruszka @ 2023-09-04  9:12 UTC (permalink / raw)
  To: Jeffrey Hugo; +Cc: quic_pkanojiy, linux-arm-msm, quic_carlv, ogabbay, dri-devel

On Fri, Sep 01, 2023 at 10:10:37AM -0600, Jeffrey Hugo wrote:
> From: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
> 
> 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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] accel/qaic: Register for PCI driver at the beginning of module init
  2023-09-01 16:10 ` Jeffrey Hugo
@ 2023-09-15 15:30   ` Jeffrey Hugo
  -1 siblings, 0 replies; 6+ messages in thread
From: Jeffrey Hugo @ 2023-09-15 15:30 UTC (permalink / raw)
  To: quic_carlv, quic_pkanojiy, stanislaw.gruszka
  Cc: ogabbay, linux-arm-msm, dri-devel

On 9/1/2023 10:10 AM, Jeffrey Hugo wrote:
> From: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
> 
> 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>

Pushed to drm-misc-next.

-Jeff

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] accel/qaic: Register for PCI driver at the beginning of module init
@ 2023-09-15 15:30   ` Jeffrey Hugo
  0 siblings, 0 replies; 6+ messages in thread
From: Jeffrey Hugo @ 2023-09-15 15:30 UTC (permalink / raw)
  To: quic_carlv, quic_pkanojiy, stanislaw.gruszka
  Cc: linux-arm-msm, ogabbay, dri-devel

On 9/1/2023 10:10 AM, Jeffrey Hugo wrote:
> From: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
> 
> 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>

Pushed to drm-misc-next.

-Jeff

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-09-15 15:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-01 16:10 [PATCH] accel/qaic: Register for PCI driver at the beginning of module init Jeffrey Hugo
2023-09-01 16:10 ` Jeffrey Hugo
2023-09-04  9:12 ` Stanislaw Gruszka
2023-09-04  9:12   ` Stanislaw Gruszka
2023-09-15 15:30 ` Jeffrey Hugo
2023-09-15 15:30   ` Jeffrey Hugo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.