All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Alexander Usyskin <sanniu@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Eric Piel <eric.piel@tremplin-utc.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Tomas Winkler <tomas.winkler@intel.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Linux PM list <linux-pm@vger.kernel.org>
Subject: Re: [PATCH] misc / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
Date: Thu, 04 Dec 2014 23:03:11 +0100	[thread overview]
Message-ID: <4645023.NJ4mlGecMX@vostro.rjw.lan> (raw)
In-Reply-To: <CA+SXBVTCnhUG383oNTtFgnDT_A1xOiM1HNOQNF+9Q5yAQJj8KQ@mail.gmail.com>

On Thursday, December 04, 2014 06:47:01 AM Alexander Usyskin wrote:
> 
> --001a1132ed64aaf31305095ca68b
> Content-Type: text/plain; charset=UTF-8
> 
> On Dec 4, 2014 2:37 AM, "Rafael J. Wysocki" <rjw@rjwysocki.net> wrote:
> >
> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> >
> > After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
> > selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks
> > depending on CONFIG_PM_RUNTIME may now be changed to depend on
> > CONFIG_PM.
> >
> > Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under
> > drivers/misc/.
> >
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > ---
> >
> > Note: This depends on commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if
> > PM_SLEEP is selected) which is only in linux-next at the moment (via the
> > linux-pm tree).
> >
> > Please let me know if it is OK to take this one into linux-pm.
> >
> > ---
> >  drivers/misc/apds990x.c                |    4 ++--
> >  drivers/misc/bh1770glc.c               |    2 +-
> >  drivers/misc/lis3lv02d/lis3lv02d_i2c.c |    4 ++--
> >  drivers/misc/mei/mei_dev.h             |    4 ++--
> >  drivers/misc/mei/pci-me.c              |    8 ++++----
> >  drivers/misc/mei/pci-txe.c             |    8 +++-----
> >  6 files changed, 14 insertions(+), 16 deletions(-)
> >
> > Index: linux-pm/drivers/misc/lis3lv02d/lis3lv02d_i2c.c
> > ===================================================================
> > --- linux-pm.orig/drivers/misc/lis3lv02d/lis3lv02d_i2c.c
> > +++ linux-pm/drivers/misc/lis3lv02d/lis3lv02d_i2c.c
> > @@ -235,7 +235,7 @@ static int lis3lv02d_i2c_resume(struct d
> >  }
> >  #endif /* CONFIG_PM_SLEEP */
> >
> > -#ifdef CONFIG_PM_RUNTIME
> > +#ifdef CONFIG_PM
> >  static int lis3_i2c_runtime_suspend(struct device *dev)
> >  {
> >         struct i2c_client *client = container_of(dev, struct i2c_client,
> dev);
> > @@ -253,7 +253,7 @@ static int lis3_i2c_runtime_resume(struc
> >         lis3lv02d_poweron(lis3);
> >         return 0;
> >  }
> > -#endif /* CONFIG_PM_RUNTIME */
> > +#endif /* CONFIG_PM */
> >
> >  static const struct i2c_device_id lis3lv02d_id[] = {
> >         {"lis3lv02d", LIS3LV02D},
> > Index: linux-pm/drivers/misc/mei/mei_dev.h
> > ===================================================================
> > --- linux-pm.orig/drivers/misc/mei/mei_dev.h
> > +++ linux-pm/drivers/misc/mei/mei_dev.h
> > @@ -530,9 +530,9 @@ struct mei_device {
> >          * Power Gating support
> >          */
> >         enum mei_pg_event pg_event;
> > -#ifdef CONFIG_PM_RUNTIME
> > +#ifdef CONFIG_PM
> >         struct dev_pm_domain pg_domain;
> > -#endif /* CONFIG_PM_RUNTIME */
> > +#endif /* CONFIG_PM */
> >
> >         unsigned char rd_msg_buf[MEI_RD_MSG_BUF_SIZE];
> >         u32 rd_msg_hdr;
> > Index: linux-pm/drivers/misc/mei/pci-me.c
> > ===================================================================
> > --- linux-pm.orig/drivers/misc/mei/pci-me.c
> > +++ linux-pm/drivers/misc/mei/pci-me.c
> > @@ -89,13 +89,13 @@ static const struct pci_device_id mei_me
> >
> >  MODULE_DEVICE_TABLE(pci, mei_me_pci_tbl);
> >
> > -#ifdef CONFIG_PM_RUNTIME
> > +#ifdef CONFIG_PM
> >  static inline void mei_me_set_pm_domain(struct mei_device *dev);
> >  static inline void mei_me_unset_pm_domain(struct mei_device *dev);
> >  #else
> >  static inline void mei_me_set_pm_domain(struct mei_device *dev) {}
> >  static inline void mei_me_unset_pm_domain(struct mei_device *dev) {}
> > -#endif /* CONFIG_PM_RUNTIME */
> > +#endif /* CONFIG_PM */
> >
> >  /**
> >   * mei_me_quirk_probe - probe for devices that doesn't valid ME interface
> > @@ -357,7 +357,7 @@ static int mei_me_pci_resume(struct devi
> >  }
> >  #endif /* CONFIG_PM_SLEEP */
> >
> > -#ifdef CONFIG_PM_RUNTIME
> > +#ifdef CONFIG_PM
> >  static int mei_me_pm_runtime_idle(struct device *device)
> >  {
> >         struct pci_dev *pdev = to_pci_dev(device);
> > @@ -453,7 +453,7 @@ static inline void mei_me_unset_pm_domai
> >         /* stop using pm callbacks if any */
> >         dev->dev->pm_domain = NULL;
> >  }
> > -#endif /* CONFIG_PM_RUNTIME */
> > +#endif /* CONFIG_PM */
> >
> 
> Here we can simply drop both endif and ifdef

Right, thanks for spotting that!

Rafael


      parent reply	other threads:[~2014-12-04 21:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-04  0:57 [PATCH] misc / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM Rafael J. Wysocki
2014-12-04  1:00 ` Greg Kroah-Hartman
     [not found] ` <CA+SXBVTCnhUG383oNTtFgnDT_A1xOiM1HNOQNF+9Q5yAQJj8KQ@mail.gmail.com>
2014-12-04 22:03   ` Rafael J. Wysocki [this message]

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=4645023.NJ4mlGecMX@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=arnd@arndb.de \
    --cc=eric.piel@tremplin-utc.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=sanniu@gmail.com \
    --cc=tomas.winkler@intel.com \
    /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.