From mboxrd@z Thu Jan 1 00:00:00 1970 From: Francisco Jerez Subject: Re: [PATCH] drm/i2c/ch7006: Convert to dev_pm_ops Date: Fri, 23 Mar 2012 02:20:42 +0100 Message-ID: <87aa38yuxh.fsf@riseup.net> References: <1332447291-26565-1-git-send-email-broonie@opensource.wolfsonmicro.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0250283104==" Return-path: Received: from mx1.riseup.net (mx1.riseup.net [204.13.164.18]) by gabe.freedesktop.org (Postfix) with ESMTP id C6B0B9E791 for ; Thu, 22 Mar 2012 18:25:56 -0700 (PDT) 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") List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Mark Brown Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0250283104== Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Mark Brown 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 > --- > 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/ch700= 6_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; > } >=20=20 > -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 =3D to_i2c_device(dev); >=20=20 > -static int ch7006_resume(struct i2c_client *client) > -{ > ch7006_dbg(client, "\n"); >=20=20 > ch7006_write(client, 0x3d, 0x0); > @@ -499,15 +494,18 @@ static struct i2c_device_id ch7006_ids[] =3D { > }; > MODULE_DEVICE_TABLE(i2c, ch7006_ids); >=20=20 > +static const struct dev_pm_ops ch7006_pm_ops =3D { > + .resume =3D ch7006_resume, > +}; > + > static struct drm_i2c_encoder_driver ch7006_driver =3D { > .i2c_driver =3D { > .probe =3D ch7006_probe, > .remove =3D ch7006_remove, > - .suspend =3D ch7006_suspend, > - .resume =3D ch7006_resume, >=20=20 > .driver =3D { > .name =3D "ch7006", > + .pm =3D ch7006_pm_ops, > }, >=20=20 > .id_table =3D ch7006_ids, Thanks for fixing this, Reviewed-by: Francisco Jerez --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iF4EAREIAAYFAk9rz+oACgkQg5k4nX1Sv1tXegD/XaezmZJziQdJcwhCmrshr0ka UR8fYLgEuw0kXzcjyhcA/i9rHppd19Z5e09ZzDJaiuEpNaevYRrvzvX4C63n0PlO =8tfG -----END PGP SIGNATURE----- --==-=-=-- --===============0250283104== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0250283104==--