summary refs log tree commit diff stats
path: root/hw/net/eepro100.c
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2025-02-25 14:52:26 -0700
committerCédric Le Goater <clg@redhat.com>2025-03-06 06:47:33 +0100
commit0681ec253141d838210b3c5e6bc0d2d71f2e111e (patch)
tree35132142e21e5937a8f9600d11257071f0781b04 /hw/net/eepro100.c
parent9461afd2008b0820fc45a6a7bc675df1b6791e4f (diff)
downloadfocaccia-qemu-0681ec253141d838210b3c5e6bc0d2d71f2e111e.tar.gz
focaccia-qemu-0681ec253141d838210b3c5e6bc0d2d71f2e111e.zip
pci: Use PCI PM capability initializer
Switch callers directly initializing the PCI PM capability with
pci_add_capability() to use pci_pm_init().

Cc: Dmitry Fleytman <dmitry.fleytman@gmail.com>
Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Stefan Weil <sw@weilnetz.de>
Cc: Sriram Yagnaraman <sriram.yagnaraman@ericsson.com>
Cc: Keith Busch <kbusch@kernel.org>
Cc: Klaus Jensen <its@irrelevant.dk>
Cc: Jesper Devantier <foss@defmacro.it>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Cc: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250225215237.3314011-3-alex.williamson@redhat.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw/net/eepro100.c')
-rw-r--r--hw/net/eepro100.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c
index 6d853229ae..29a39865a6 100644
--- a/hw/net/eepro100.c
+++ b/hw/net/eepro100.c
@@ -551,9 +551,7 @@ static void e100_pci_reset(EEPRO100State *s, Error **errp)
     if (info->power_management) {
         /* Power Management Capabilities */
         int cfg_offset = 0xdc;
-        int r = pci_add_capability(&s->dev, PCI_CAP_ID_PM,
-                                   cfg_offset, PCI_PM_SIZEOF,
-                                   errp);
+        int r = pci_pm_init(&s->dev, cfg_offset, errp);
         if (r < 0) {
             return;
         }