From: Bjorn Helgaas <helgaas@kernel.org>
To: David Airlie <airlied@redhat.com>
Cc: "Krzysztof Wilczyński" <kw@linux.com>,
"Rafael J . Wysocki" <rafael@kernel.org>,
"Vaibhav Gupta" <vaibhavgupta40@gmail.com>,
dri-devel@lists.freedesktop.org, linux-pci@vger.kernel.org,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
"Bjorn Helgaas" <bhelgaas@google.com>
Subject: [PATCH v2 6/8] agp/amd64: Update to DEFINE_SIMPLE_DEV_PM_OPS()
Date: Tue, 25 Oct 2022 15:38:50 -0500 [thread overview]
Message-ID: <20221025203852.681822-7-helgaas@kernel.org> (raw)
In-Reply-To: <20221025203852.681822-1-helgaas@kernel.org>
From: Bjorn Helgaas <bhelgaas@google.com>
As of 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros, deprecate old
ones"), SIMPLE_DEV_PM_OPS() is deprecated in favor of
DEFINE_SIMPLE_DEV_PM_OPS(), which has the advantage that the PM callbacks
don't need to be wrapped with #ifdef CONFIG_PM or tagged with
__maybe_unused.
Convert to DEFINE_SIMPLE_DEV_PM_OPS(). No functional change intended.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
drivers/char/agp/amd64-agp.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index 84a4aa9312cf..ce8651436609 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -588,9 +588,7 @@ static void agp_amd64_remove(struct pci_dev *pdev)
agp_bridges_found--;
}
-#define agp_amd64_suspend NULL
-
-static int __maybe_unused agp_amd64_resume(struct device *dev)
+static int agp_amd64_resume(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
@@ -727,7 +725,7 @@ static const struct pci_device_id agp_amd64_pci_promisc_table[] = {
{ }
};
-static SIMPLE_DEV_PM_OPS(agp_amd64_pm_ops, agp_amd64_suspend, agp_amd64_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(agp_amd64_pm_ops, NULL, agp_amd64_resume);
static struct pci_driver agp_amd64_pci_driver = {
.name = "agpgart-amd64",
--
2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Bjorn Helgaas <helgaas@kernel.org>
To: David Airlie <airlied@redhat.com>
Cc: "Krzysztof Wilczyński" <kw@linux.com>,
linux-pm@vger.kernel.org, linux-pci@vger.kernel.org,
"Vaibhav Gupta" <vaibhavgupta40@gmail.com>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Rafael J . Wysocki" <rafael@kernel.org>
Subject: [PATCH v2 6/8] agp/amd64: Update to DEFINE_SIMPLE_DEV_PM_OPS()
Date: Tue, 25 Oct 2022 15:38:50 -0500 [thread overview]
Message-ID: <20221025203852.681822-7-helgaas@kernel.org> (raw)
In-Reply-To: <20221025203852.681822-1-helgaas@kernel.org>
From: Bjorn Helgaas <bhelgaas@google.com>
As of 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros, deprecate old
ones"), SIMPLE_DEV_PM_OPS() is deprecated in favor of
DEFINE_SIMPLE_DEV_PM_OPS(), which has the advantage that the PM callbacks
don't need to be wrapped with #ifdef CONFIG_PM or tagged with
__maybe_unused.
Convert to DEFINE_SIMPLE_DEV_PM_OPS(). No functional change intended.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
drivers/char/agp/amd64-agp.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index 84a4aa9312cf..ce8651436609 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -588,9 +588,7 @@ static void agp_amd64_remove(struct pci_dev *pdev)
agp_bridges_found--;
}
-#define agp_amd64_suspend NULL
-
-static int __maybe_unused agp_amd64_resume(struct device *dev)
+static int agp_amd64_resume(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
@@ -727,7 +725,7 @@ static const struct pci_device_id agp_amd64_pci_promisc_table[] = {
{ }
};
-static SIMPLE_DEV_PM_OPS(agp_amd64_pm_ops, agp_amd64_suspend, agp_amd64_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(agp_amd64_pm_ops, NULL, agp_amd64_resume);
static struct pci_driver agp_amd64_pci_driver = {
.name = "agpgart-amd64",
--
2.25.1
next prev parent reply other threads:[~2022-10-25 20:39 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-25 20:38 [PATCH v2 0/8] agp: Convert to generic power management Bjorn Helgaas
2022-10-25 20:38 ` Bjorn Helgaas
2022-10-25 20:38 ` [PATCH v2 1/8] agp/efficeon: " Bjorn Helgaas
2022-10-25 20:38 ` Bjorn Helgaas
2022-10-25 20:38 ` [PATCH v2 2/8] agp/intel: " Bjorn Helgaas
2022-10-25 20:38 ` Bjorn Helgaas
2022-10-25 20:38 ` [PATCH v2 3/8] agp/amd-k7: " Bjorn Helgaas
2022-10-25 20:38 ` Bjorn Helgaas
2022-10-25 20:38 ` [PATCH v2 4/8] agp/ati: " Bjorn Helgaas
2022-10-25 20:38 ` Bjorn Helgaas
2022-10-25 20:38 ` [PATCH v2 5/8] agp/nvidia: " Bjorn Helgaas
2022-10-25 20:38 ` Bjorn Helgaas
2022-10-25 20:38 ` Bjorn Helgaas [this message]
2022-10-25 20:38 ` [PATCH v2 6/8] agp/amd64: Update to DEFINE_SIMPLE_DEV_PM_OPS() Bjorn Helgaas
2022-10-25 20:38 ` [PATCH v2 7/8] agp/sis: " Bjorn Helgaas
2022-10-25 20:38 ` Bjorn Helgaas
2022-10-25 20:38 ` [PATCH v2 8/8] agp/via: " Bjorn Helgaas
2022-10-25 20:38 ` Bjorn Helgaas
2022-10-25 22:17 ` [PATCH v2 0/8] agp: Convert to generic power management Dave Airlie
2022-10-25 22:17 ` Dave Airlie
2022-10-25 22:43 ` Bjorn Helgaas
2022-10-25 22:43 ` Bjorn Helgaas
2022-10-25 22:44 ` Bjorn Helgaas
2022-10-25 22:44 ` Bjorn Helgaas
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=20221025203852.681822-7-helgaas@kernel.org \
--to=helgaas@kernel.org \
--cc=airlied@redhat.com \
--cc=bhelgaas@google.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=vaibhavgupta40@gmail.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.