All of lore.kernel.org
 help / color / mirror / Atom feed
From: Francisco Jerez <currojerez@riseup.net>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/i2c/ch7006: Convert to dev_pm_ops
Date: Fri, 23 Mar 2012 02:20:42 +0100	[thread overview]
Message-ID: <87aa38yuxh.fsf@riseup.net> (raw)
In-Reply-To: <1332447291-26565-1-git-send-email-broonie@opensource.wolfsonmicro.com> (Mark Brown's message of "Thu, 22 Mar 2012 20:14:51 +0000")


[-- Attachment #1.1.1: Type: text/plain, Size: 1809 bytes --]

Mark Brown <broonie@opensource.wolfsonmicro.com> writes:

> The I2C specific suspend and resume functions have been deprecated and
> printing a warning on boot for over a year, dev_pm_ops should be used
> instead so convert to that.
>
> Also remove the suspend function since all it does is log.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
>  drivers/gpu/drm/i2c/ch7006_drv.c |   16 +++++++---------
>  1 files changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i2c/ch7006_drv.c b/drivers/gpu/drm/i2c/ch7006_drv.c
> index d3f2e87..ca4435d 100644
> --- a/drivers/gpu/drm/i2c/ch7006_drv.c
> +++ b/drivers/gpu/drm/i2c/ch7006_drv.c
> @@ -427,15 +427,10 @@ static int ch7006_remove(struct i2c_client *client)
>  	return 0;
>  }
>  
> -static int ch7006_suspend(struct i2c_client *client, pm_message_t mesg)
> +static int ch7006_resume(struct device *dev)
>  {
> -	ch7006_dbg(client, "\n");
> -
> -	return 0;
> -}
> +	struct i2c_client *client = to_i2c_device(dev);
>  
> -static int ch7006_resume(struct i2c_client *client)
> -{
>  	ch7006_dbg(client, "\n");
>  
>  	ch7006_write(client, 0x3d, 0x0);
> @@ -499,15 +494,18 @@ static struct i2c_device_id ch7006_ids[] = {
>  };
>  MODULE_DEVICE_TABLE(i2c, ch7006_ids);
>  
> +static const struct dev_pm_ops ch7006_pm_ops = {
> +	.resume = ch7006_resume,
> +};
> +
>  static struct drm_i2c_encoder_driver ch7006_driver = {
>  	.i2c_driver = {
>  		.probe = ch7006_probe,
>  		.remove = ch7006_remove,
> -		.suspend = ch7006_suspend,
> -		.resume = ch7006_resume,
>  
>  		.driver = {
>  			.name = "ch7006",
> +			.pm = ch7006_pm_ops,
>  		},
>  
>  		.id_table = ch7006_ids,

Thanks for fixing this,

Reviewed-by: Francisco Jerez <currojerez@riseup.net>

[-- Attachment #1.2: Type: application/pgp-signature, Size: 229 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2012-03-23  1:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-22 20:14 [PATCH] drm/i2c/ch7006: Convert to dev_pm_ops Mark Brown
2012-03-23  1:20 ` Francisco Jerez [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-04-02 22:41 Mark Brown
2012-05-03 10:58 Mark Brown
2012-06-05 15:17 Mark Brown
2012-06-12  1:45 Mark Brown
2012-06-27  9:21 ` Dave Airlie
2012-06-27 11:10   ` Mark Brown
2012-06-27 11:04 Mark Brown
2012-08-07 11:14 Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87aa38yuxh.fsf@riseup.net \
    --to=currojerez@riseup.net \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.