From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753723AbcFHPfg (ORCPT ); Wed, 8 Jun 2016 11:35:36 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:35583 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161845AbcFHPfa (ORCPT ); Wed, 8 Jun 2016 11:35:30 -0400 Date: Wed, 8 Jun 2016 16:35:59 +0100 From: Lee Jones To: "Andrew F. Davis" Cc: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Dmitry Torokhov , Dave Gerlach , linux-iio@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/8] mfd: ti_am335x_tscadc: Use SIMPLE_DEV_PM_OPS helper macro Message-ID: <20160608153559.GV14888@dell> References: <20160531170013.2649-1-afd@ti.com> <20160531170013.2649-2-afd@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160531170013.2649-2-afd@ti.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 On Tue, 31 May 2016, Andrew F. Davis wrote: > Replace ifdefs with SIMPLE_DEV_PM_OPS helper macro. > > Signed-off-by: Andrew F. Davis > --- > drivers/mfd/ti_am335x_tscadc.c | 16 ++++------------ > 1 file changed, 4 insertions(+), 12 deletions(-) Acked-by: Lee Jones > diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c > index e4e4b22..644128b 100644 > --- a/drivers/mfd/ti_am335x_tscadc.c > +++ b/drivers/mfd/ti_am335x_tscadc.c > @@ -310,8 +310,7 @@ static int ti_tscadc_remove(struct platform_device *pdev) > return 0; > } > > -#ifdef CONFIG_PM > -static int tscadc_suspend(struct device *dev) > +static int __maybe_unused tscadc_suspend(struct device *dev) > { > struct ti_tscadc_dev *tscadc_dev = dev_get_drvdata(dev); > > @@ -321,7 +320,7 @@ static int tscadc_suspend(struct device *dev) > return 0; > } > > -static int tscadc_resume(struct device *dev) > +static int __maybe_unused tscadc_resume(struct device *dev) > { > struct ti_tscadc_dev *tscadc_dev = dev_get_drvdata(dev); > u32 ctrl; > @@ -347,14 +346,7 @@ static int tscadc_resume(struct device *dev) > return 0; > } > > -static const struct dev_pm_ops tscadc_pm_ops = { > - .suspend = tscadc_suspend, > - .resume = tscadc_resume, > -}; > -#define TSCADC_PM_OPS (&tscadc_pm_ops) > -#else > -#define TSCADC_PM_OPS NULL > -#endif > +static SIMPLE_DEV_PM_OPS(tscadc_pm_ops, tscadc_suspend, tscadc_resume); > > static const struct of_device_id ti_tscadc_dt_ids[] = { > { .compatible = "ti,am3359-tscadc", }, > @@ -365,7 +357,7 @@ MODULE_DEVICE_TABLE(of, ti_tscadc_dt_ids); > static struct platform_driver ti_tscadc_driver = { > .driver = { > .name = "ti_am3359-tscadc", > - .pm = TSCADC_PM_OPS, > + .pm = &tscadc_pm_ops, > .of_match_table = ti_tscadc_dt_ids, > }, > .probe = ti_tscadc_probe, -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Subject: Re: [PATCH 1/8] mfd: ti_am335x_tscadc: Use SIMPLE_DEV_PM_OPS helper macro Date: Wed, 8 Jun 2016 16:35:59 +0100 Message-ID: <20160608153559.GV14888@dell> References: <20160531170013.2649-1-afd@ti.com> <20160531170013.2649-2-afd@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mail-wm0-f45.google.com ([74.125.82.45]:37986 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161857AbcFHPfa (ORCPT ); Wed, 8 Jun 2016 11:35:30 -0400 Received: by mail-wm0-f45.google.com with SMTP id m124so22625518wme.1 for ; Wed, 08 Jun 2016 08:35:29 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20160531170013.2649-2-afd@ti.com> Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: "Andrew F. Davis" Cc: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Dmitry Torokhov , Dave Gerlach , linux-iio@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org On Tue, 31 May 2016, Andrew F. Davis wrote: > Replace ifdefs with SIMPLE_DEV_PM_OPS helper macro. >=20 > Signed-off-by: Andrew F. Davis > --- > drivers/mfd/ti_am335x_tscadc.c | 16 ++++------------ > 1 file changed, 4 insertions(+), 12 deletions(-) Acked-by: Lee Jones > diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_t= scadc.c > index e4e4b22..644128b 100644 > --- a/drivers/mfd/ti_am335x_tscadc.c > +++ b/drivers/mfd/ti_am335x_tscadc.c > @@ -310,8 +310,7 @@ static int ti_tscadc_remove(struct platform_devic= e *pdev) > return 0; > } > =20 > -#ifdef CONFIG_PM > -static int tscadc_suspend(struct device *dev) > +static int __maybe_unused tscadc_suspend(struct device *dev) > { > struct ti_tscadc_dev *tscadc_dev =3D dev_get_drvdata(dev); > =20 > @@ -321,7 +320,7 @@ static int tscadc_suspend(struct device *dev) > return 0; > } > =20 > -static int tscadc_resume(struct device *dev) > +static int __maybe_unused tscadc_resume(struct device *dev) > { > struct ti_tscadc_dev *tscadc_dev =3D dev_get_drvdata(dev); > u32 ctrl; > @@ -347,14 +346,7 @@ static int tscadc_resume(struct device *dev) > return 0; > } > =20 > -static const struct dev_pm_ops tscadc_pm_ops =3D { > - .suspend =3D tscadc_suspend, > - .resume =3D tscadc_resume, > -}; > -#define TSCADC_PM_OPS (&tscadc_pm_ops) > -#else > -#define TSCADC_PM_OPS NULL > -#endif > +static SIMPLE_DEV_PM_OPS(tscadc_pm_ops, tscadc_suspend, tscadc_resum= e); > =20 > static const struct of_device_id ti_tscadc_dt_ids[] =3D { > { .compatible =3D "ti,am3359-tscadc", }, > @@ -365,7 +357,7 @@ MODULE_DEVICE_TABLE(of, ti_tscadc_dt_ids); > static struct platform_driver ti_tscadc_driver =3D { > .driver =3D { > .name =3D "ti_am3359-tscadc", > - .pm =3D TSCADC_PM_OPS, > + .pm =3D &tscadc_pm_ops, > .of_match_table =3D ti_tscadc_dt_ids, > }, > .probe =3D ti_tscadc_probe, --=20 Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org =E2=94=82 Open source software for ARM SoCs =46ollow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-input" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html