From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934805AbbIVVMo (ORCPT ); Tue, 22 Sep 2015 17:12:44 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:54400 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934656AbbIVVMm (ORCPT ); Tue, 22 Sep 2015 17:12:42 -0400 Date: Tue, 22 Sep 2015 16:12:34 -0500 From: Felipe Balbi To: "Felipe F. Tonello" CC: , , Peter Chen , Greg Kroah-Hartman , Felipe Balbi , Andrzej Pietrasiewicz Subject: Re: [PATCH 1/3] usb: chipidea: core: fix when building without CONFIG_PM support Message-ID: <20150922211234.GD7094@saruman.tx.rr.com> Reply-To: References: <1442948350-31702-1-git-send-email-eu@felipetonello.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jL2BoiuKMElzg3CS" Content-Disposition: inline In-Reply-To: <1442948350-31702-1-git-send-email-eu@felipetonello.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --jL2BoiuKMElzg3CS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Tue, Sep 22, 2015 at 07:59:08PM +0100, Felipe F. Tonello wrote: > If CONFIG_PM or CONFIG_PM_SLEEP is not set, driver will not compile > properly. >=20 > Signed-off-by: Felipe F. Tonello > --- > drivers/usb/chipidea/core.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c > index 3ad48e1..4182549 100644 > --- a/drivers/usb/chipidea/core.c > +++ b/drivers/usb/chipidea/core.c > @@ -1009,18 +1009,22 @@ static int ci_runtime_resume(struct device *dev) > return ci_controller_resume(dev); > } > =20 > -#endif /* CONFIG_PM */ > static const struct dev_pm_ops ci_pm_ops =3D { > +#ifdef CONFIG_PM_SLEEP > SET_SYSTEM_SLEEP_PM_OPS(ci_suspend, ci_resume) > +#endif /* CONFIG_PM_SLEEP */ NAK, this is not the right way to do it. Look at the definition of SET_SYSTEM_SLEEP_PM_OPS() and other users in the kernel. > SET_RUNTIME_PM_OPS(ci_runtime_suspend, ci_runtime_resume, NULL) > }; > +#endif /* CONFIG_PM */ > =20 > static struct platform_driver ci_hdrc_driver =3D { > .probe =3D ci_hdrc_probe, > .remove =3D ci_hdrc_remove, > .driver =3D { > .name =3D "ci_hdrc", > +#ifdef CONFIG_PM > .pm =3D &ci_pm_ops, > +#endif > }, > }; > =20 > --=20 > 2.1.4 >=20 --=20 balbi --jL2BoiuKMElzg3CS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWAcRCAAoJEIaOsuA1yqREODoQAKvnzEBvu35UbYjUeGLRspAW ay8XOf92A1NLS5ItsQCsnOCCxbCc/wf0wV2UBqlpbbHwurJzn1xMaOd2GH1Yl9Ut efLWTiButS0l9RE4H2r6Ssc0rv02N9J78n2Ou+B3OrMXD5zdgLTxyKeYWuKx+bci j3zz/YlUdiNmKbypmfOzOMNAWQQ1earMjLc/MIjzSAn18XtG/8Uoqs46Mbz41/+H wN/aWfYKQITnAP7is0wDfoObmvzzeOyGfU7PBGQmRJCFV0krJshs4qGGMS0QWgof DZLJWnOPsWSlb3uiHij6OQJsfOrgO+GLqU+vWAEeiVrgYTz97kVp9nZciqfxMW+J yqI4lvminUc25k0Ql/fg4Pgu6efbcFxK5PCa3LAbJoInEQPbAHOP2O2bmP/Gl8B7 K+jqbvTgirDmkpAAzwgsi9SyTLOhRuPqr8YE8bWZNt6Ssy8U5CiM8LKVz6qPdFmQ HVnNrCVuQ0v6wfReLnsRsErdoNOHmSENlR2pcg/FnsWhuZDRprjIlcBxaXEszshU K38af7OI+KI+d71uAEuzOXYbAaEGUoY7UpMkUcCc9ZMCYfHFenYBBZMlDCQoe2k3 EGSpvIEnn89BthXu8pZ0n5wAlY+oFw4nZeBBJPAvbm40pYMcP6f++9CSAYXKTAbS JB52V4rIRPo9t7kG6cLo =KWVt -----END PGP SIGNATURE----- --jL2BoiuKMElzg3CS--