diff mbox series

[01/10] drm/xe: use pdev_to_xe_device() instead of pci_get_drvdata() directly

Message ID c13789bf7d7c5ade4f71f1ac24a7fbc1b2a96195.1722263308.git.jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/xe & drm/i915: drvdata usage changes | expand

Commit Message

Jani Nikula July 29, 2024, 2:30 p.m. UTC
We have a helper for converting pci device to xe device, use it.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/xe/xe_pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Gustavo Sousa Aug. 1, 2024, 4:31 p.m. UTC | #1
Quoting Jani Nikula (2024-07-29 11:30:02-03:00)
>We have a helper for converting pci device to xe device, use it.
>
>Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>

>---
> drivers/gpu/drm/xe/xe_pci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
>index f818aa69f3ca..7bb811b4a057 100644
>--- a/drivers/gpu/drm/xe/xe_pci.c
>+++ b/drivers/gpu/drm/xe/xe_pci.c
>@@ -752,7 +752,7 @@ static void xe_pci_remove(struct pci_dev *pdev)
> {
>         struct xe_device *xe;
> 
>-        xe = pci_get_drvdata(pdev);
>+        xe = pdev_to_xe_device(pdev);
>         if (!xe) /* driver load aborted, nothing to cleanup */
>                 return;
> 
>-- 
>2.39.2
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index f818aa69f3ca..7bb811b4a057 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -752,7 +752,7 @@  static void xe_pci_remove(struct pci_dev *pdev)
 {
 	struct xe_device *xe;
 
-	xe = pci_get_drvdata(pdev);
+	xe = pdev_to_xe_device(pdev);
 	if (!xe) /* driver load aborted, nothing to cleanup */
 		return;