linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: [PATCH v2 3/6] i2c: designware-pci: use __maybe_unused for PM functions
Date: Mon, 13 Dec 2021 20:00:31 +0200	[thread overview]
Message-ID: <20211213180034.30929-3-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20211213180034.30929-1-andriy.shevchenko@linux.intel.com>

Use __maybe_unused for PM functions instead of ifdeffery.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
v2: added tag (Jarkko)
 drivers/i2c/busses/i2c-designware-pcidrv.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
index 85860902c496..e4be5420840a 100644
--- a/drivers/i2c/busses/i2c-designware-pcidrv.c
+++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
@@ -206,8 +206,7 @@ static struct dw_pci_controller dw_pci_controllers[] = {
 	},
 };
 
-#ifdef CONFIG_PM
-static int i2c_dw_pci_suspend(struct device *d)
+static int __maybe_unused i2c_dw_pci_suspend(struct device *d)
 {
 	struct dw_i2c_dev *dev = dev_get_drvdata(d);
 
@@ -217,7 +216,7 @@ static int i2c_dw_pci_suspend(struct device *d)
 	return 0;
 }
 
-static int i2c_dw_pci_resume(struct device *d)
+static int __maybe_unused i2c_dw_pci_resume(struct device *d)
 {
 	struct dw_i2c_dev *dev = dev_get_drvdata(d);
 	int ret;
@@ -227,7 +226,6 @@ static int i2c_dw_pci_resume(struct device *d)
 
 	return ret;
 }
-#endif
 
 static UNIVERSAL_DEV_PM_OPS(i2c_dw_pm_ops, i2c_dw_pci_suspend,
 			    i2c_dw_pci_resume, NULL);
-- 
2.33.0


  parent reply	other threads:[~2021-12-13 18:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-13 18:00 [PATCH v2 1/6] i2c: designware-pci: Use temporary variable for struct device Andy Shevchenko
2021-12-13 18:00 ` [PATCH v2 2/6] i2c: designware-pci: Convert to use dev_err_probe() Andy Shevchenko
2021-12-13 18:00 ` Andy Shevchenko [this message]
2021-12-13 18:00 ` [PATCH v2 4/6] i2c: designware-pci: Fix to change data types of hcnt and lcnt parameters Andy Shevchenko
2021-12-15  7:55   ` Jarkko Nikula
2021-12-15 13:51     ` Andy Shevchenko
2021-12-15 14:21       ` Jarkko Nikula
2021-12-13 18:00 ` [PATCH v2 5/6] i2c: designware-pci: Group MODULE_*() macros Andy Shevchenko
2021-12-13 18:00 ` [PATCH v2 6/6] i2c: designware-pci: Add a note about struct dw_scl_sda_cfg usage Andy Shevchenko
2021-12-15  7:51 ` [PATCH v2 1/6] i2c: designware-pci: Use temporary variable for struct device Jarkko Nikula
2021-12-15 13:48   ` Andy Shevchenko
2021-12-15 14:15     ` Jarkko Nikula
2021-12-15 13:58 ` Andy Shevchenko

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=20211213180034.30929-3-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).