diff mbox

[3/5] drm/i915: Kill the dev variable in intel_suspend_complete()

Message ID 1432129518-29140-4-git-send-email-damien.lespiau@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lespiau, Damien May 20, 2015, 1:45 p.m. UTC
The macros we use there are the magic ones that can take either dev or
dev_priv. We'd like to move as much as possible towards dev_priv though.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comments

Ville Syrjälä May 21, 2015, 2:43 p.m. UTC | #1
On Wed, May 20, 2015 at 02:45:16PM +0100, Damien Lespiau wrote:
> The macros we use there are the magic ones that can take either dev or
> dev_priv. We'd like to move as much as possible towards dev_priv though.
> 
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>

Patches 2 and 3 look fine to me.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/i915_drv.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 442dd6c..93191c1 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1590,16 +1590,15 @@ static int intel_runtime_resume(struct device *device)
>   */
>  static int intel_suspend_complete(struct drm_i915_private *dev_priv)
>  {
> -	struct drm_device *dev = dev_priv->dev;
>  	int ret;
>  
> -	if (IS_BROXTON(dev))
> +	if (IS_BROXTON(dev_priv))
>  		ret = bxt_suspend_complete(dev_priv);
> -	else if (IS_SKYLAKE(dev))
> +	else if (IS_SKYLAKE(dev_priv))
>  		ret = skl_suspend_complete(dev_priv);
> -	else if (IS_HASWELL(dev) || IS_BROADWELL(dev))
> +	else if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv))
>  		ret = hsw_suspend_complete(dev_priv);
> -	else if (IS_VALLEYVIEW(dev))
> +	else if (IS_VALLEYVIEW(dev_priv))
>  		ret = vlv_suspend_complete(dev_priv);
>  	else
>  		ret = 0;
> -- 
> 2.1.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 442dd6c..93191c1 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1590,16 +1590,15 @@  static int intel_runtime_resume(struct device *device)
  */
 static int intel_suspend_complete(struct drm_i915_private *dev_priv)
 {
-	struct drm_device *dev = dev_priv->dev;
 	int ret;
 
-	if (IS_BROXTON(dev))
+	if (IS_BROXTON(dev_priv))
 		ret = bxt_suspend_complete(dev_priv);
-	else if (IS_SKYLAKE(dev))
+	else if (IS_SKYLAKE(dev_priv))
 		ret = skl_suspend_complete(dev_priv);
-	else if (IS_HASWELL(dev) || IS_BROADWELL(dev))
+	else if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv))
 		ret = hsw_suspend_complete(dev_priv);
-	else if (IS_VALLEYVIEW(dev))
+	else if (IS_VALLEYVIEW(dev_priv))
 		ret = vlv_suspend_complete(dev_priv);
 	else
 		ret = 0;