Patchwork pcnet-pci: use pci_config_set_revision()

login
register
mail settings
Submitter Sebastian Herbszt
Date Dec. 20, 2010, 9:40 p.m.
Message ID <1292881241$794@local>
Download mbox | patch
Permalink /patch/76235/
State New
Headers show

Comments

Sebastian Herbszt - Dec. 20, 2010, 9:40 p.m.
Use pci_config_set_revision().

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>

Patch

diff --git a/hw/pcnet-pci.c b/hw/pcnet-pci.c
index 339a401..c9811e2 100644
--- a/hw/pcnet-pci.c
+++ b/hw/pcnet-pci.c
@@ -282,7 +282,7 @@  static int pci_pcnet_init(PCIDevice *pci_dev)
     pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_AMD_LANCE);
     pci_set_word(pci_conf + PCI_STATUS,
                  PCI_STATUS_FAST_BACK | PCI_STATUS_DEVSEL_MEDIUM);
-    pci_conf[PCI_REVISION_ID] = 0x10;
+    pci_config_set_revision(pci_conf, 0x10);
     pci_config_set_class(pci_conf, PCI_CLASS_NETWORK_ETHERNET);
 
     pci_set_word(pci_conf + PCI_SUBSYSTEM_VENDOR_ID, 0x0);