Skip to contentSkip to conversation

drm/arm: Replace instances of drm_dev_unref with drm_dev_put.

PATCH In review Srishti Sharma 2 participants 2 messages Sep 29, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/arm: Replace instances of drm_dev_unref with drm_dev_put.

Replace drm_dev_unref with drm_dev_put as it is more consistent with kernel coding style. Done using the following semantic patch by coccinelle.

@r@
expression e;
@@

-drm_dev_unref();
+drm_dev_put();

---
 drivers/gpu/drm/arm/hdlcd_drv.c  | 4 ++--
 drivers/gpu/drm/arm/malidp_drv.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/arm/hdlcd_drv.c +2 -2
index f9bda7b..1a96462 100644
@@ -353,7 +353,7 @@ static int hdlcd_drm_bind(struct device *dev)
 err_free:
 	drm_mode_config_cleanup(drm);
 	dev_set_drvdata(dev, NULL);
-	drm_dev_unref(drm);
+	drm_dev_put(drm);
 
 	return ret;
 }
@@ -378,7 +378,7 @@ static void hdlcd_drm_unbind(struct device *dev)
 	pm_runtime_disable(drm->dev);
 	of_reserved_mem_device_release(drm->dev);
 	drm_mode_config_cleanup(drm);
-	drm_dev_unref(drm);
+	drm_dev_put(drm);
 	drm->dev_private = NULL;
 	dev_set_drvdata(dev, NULL);
 }
drivers/gpu/drm/arm/malidp_drv.c +2 -2
index 7ae94a1..1b92f41 100644
@@ -665,7 +665,7 @@ static int malidp_bind(struct device *dev)
 		malidp_runtime_pm_suspend(dev);
 	drm->dev_private = NULL;
 	dev_set_drvdata(dev, NULL);
-	drm_dev_unref(drm);
+	drm_dev_put(drm);
 alloc_fail:
 	of_reserved_mem_device_release(dev);
 
@@ -698,7 +698,7 @@ static void malidp_unbind(struct device *dev)
 		malidp_runtime_pm_suspend(dev);
 	drm->dev_private = NULL;
 	dev_set_drvdata(dev, NULL);
-	drm_dev_unref(drm);
+	drm_dev_put(drm);
 	of_reserved_mem_device_release(dev);
 }
 
Signature · 1 line
2.7.4
maintainer Acked-by on v1 1/1
#1 lore raw

Hi Srishti,

Quoted 3 lines · Srishti Sharma

Replace drm_dev_unref with drm_dev_put as it is more consistent with kernel coding style. Done using the following semantic patch by coccinelle.

Thanks for the patch!

I'm going to pull this patch into the mali-dp tree next week when I'm preparing an update of that tree.

Best regards,
Liviu

Quoted 61 lines

@r@
expression e;
@@

(quoted diff) +1 -1
-drm_dev_unref();
+drm_dev_put();
---
 drivers/gpu/drm/arm/hdlcd_drv.c  | 4 ++--
 drivers/gpu/drm/arm/malidp_drv.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/arm/hdlcd_drv.c +2 -2
index f9bda7b..1a96462 100644
@@ -353,7 +353,7 @@ static int hdlcd_drm_bind(struct device *dev)
 err_free:
 	drm_mode_config_cleanup(drm);
 	dev_set_drvdata(dev, NULL);
-	drm_dev_unref(drm);
+	drm_dev_put(drm);
 
 	return ret;
 }
@@ -378,7 +378,7 @@ static void hdlcd_drm_unbind(struct device *dev)
 	pm_runtime_disable(drm->dev);
 	of_reserved_mem_device_release(drm->dev);
 	drm_mode_config_cleanup(drm);
-	drm_dev_unref(drm);
+	drm_dev_put(drm);
 	drm->dev_private = NULL;
 	dev_set_drvdata(dev, NULL);
 }
drivers/gpu/drm/arm/malidp_drv.c +2 -2
index 7ae94a1..1b92f41 100644
@@ -665,7 +665,7 @@ static int malidp_bind(struct device *dev)
 		malidp_runtime_pm_suspend(dev);
 	drm->dev_private = NULL;
 	dev_set_drvdata(dev, NULL);
-	drm_dev_unref(drm);
+	drm_dev_put(drm);
 alloc_fail:
 	of_reserved_mem_device_release(dev);
 
@@ -698,7 +698,7 @@ static void malidp_unbind(struct device *dev)
 		malidp_runtime_pm_suspend(dev);
 	drm->dev_private = NULL;
 	dev_set_drvdata(dev, NULL);
-	drm_dev_unref(drm);
+	drm_dev_put(drm);
 	of_reserved_mem_device_release(dev);
 }
 
Signature · 1 line
2.7.4
Signature · 12 lines
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel