From: Simon Horman <horms@verge.net.au>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Magnus Damm <magnus.damm@gmail.com>,
"Rafael J. Wysocki" <rjw@sisk.pl>, Arnd Bergmann <arnd@arndb.de>,
linux-sh@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: [PATCH] Input: st1232 - switch to using SIMPLE_DEV_PM_OPS
Date: Sun, 01 Apr 2012 23:28:08 +0000 [thread overview]
Message-ID: <20120401232808.GA2336@verge.net.au> (raw)
In-Reply-To: <20120331061801.GA20441@core.coreip.homeip.net>
Hi,
I'm not sure that I follow why st1232_ts_pm_ops is needed
if CONFIG_PM_SLEEP isn't defined.
On Fri, Mar 30, 2012 at 11:18:02PM -0700, Dmitry Torokhov wrote:
> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
> ---
>
> Just compiled, not tested...
>
> drivers/input/touchscreen/st1232.c | 11 ++++-------
> 1 files changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/input/touchscreen/st1232.c b/drivers/input/touchscreen/st1232.c
> index e22e27e..a9be39f 100644
> --- a/drivers/input/touchscreen/st1232.c
> +++ b/drivers/input/touchscreen/st1232.c
> @@ -218,7 +218,7 @@ static int __devexit st1232_ts_remove(struct i2c_client *client)
> return 0;
> }
>
> -#ifdef CONFIG_PM
> +#ifdef CONFIG_PM_SLEEP
> static int st1232_ts_suspend(struct device *dev)
> {
> struct i2c_client *client = to_i2c_client(dev);
> @@ -243,12 +243,11 @@ static int st1232_ts_resume(struct device *dev)
> return 0;
> }
>
> -static const struct dev_pm_ops st1232_ts_pm_ops = {
> - .suspend = st1232_ts_suspend,
> - .resume = st1232_ts_resume,
> -};
> #endif
>
> +static SIMPLE_DEV_PM_OPS(st1232_ts_pm_ops,
> + st1232_ts_suspend, st1232_ts_resume);
> +
> static const struct i2c_device_id st1232_ts_id[] = {
> { ST1232_TS_NAME, 0 },
> { }
> @@ -269,9 +268,7 @@ static struct i2c_driver st1232_ts_driver = {
> .name = ST1232_TS_NAME,
> .owner = THIS_MODULE,
> .of_match_table = st1232_ts_dt_ids,
> -#ifdef CONFIG_PM
> .pm = &st1232_ts_pm_ops,
> -#endif
> },
> };
>
> --
> 1.7.7.6
>
>
> --
> Dmitry
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2012-04-01 23:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-31 6:18 [PATCH] Input: st1232 - switch to using SIMPLE_DEV_PM_OPS Dmitry Torokhov
2012-04-01 5:58 ` Rafael J. Wysocki
2012-04-01 23:28 ` Simon Horman [this message]
2012-04-02 0:41 ` Dmitry Torokhov
2012-04-02 5:03 ` Simon Horman
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=20120401232808.GA2336@verge.net.au \
--to=horms@verge.net.au \
--cc=arnd@arndb.de \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=rjw@sisk.pl \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox