]> mj.ucw.cz Git - pciutils.git/blobdiff - lib/obsd-device.c
Fix versioned symbol aliases when used with link-time optimization
[pciutils.git] / lib / obsd-device.c
index 62395b376f2b5917d84f1797cede1faebfc5eece..71cde5eb32c48bcb2fdec7c439c5409fd36c1b36 100644 (file)
@@ -65,7 +65,7 @@ obsd_read(struct pci_dev *d, int pos, byte *buf, int len)
   if (!(len == 1 || len == 2 || len == 4))
     return pci_generic_block_read(d, pos, buf, len);
 
-  if (pos >= 256)
+  if (d->domain || pos >= 256)
     return 0;
 
   pi.pi_sel.pc_bus = d->bus;
@@ -106,7 +106,7 @@ obsd_write(struct pci_dev *d, int pos, byte *buf, int len)
   if (!(len == 1 || len == 2 || len == 4))
     return pci_generic_block_write(d, pos, buf, len);
 
-  if (pos >= 256)
+  if (d->domain || pos >= 256)
     return 0;
 
   pi.pi_sel.pc_bus = d->bus;
@@ -146,6 +146,7 @@ struct pci_methods pm_obsd_device = {
   pci_generic_fill_info,
   obsd_read,
   obsd_write,
+  NULL,                                 /* read_vpd */
   NULL,                                 /* dev_init */
   NULL                                  /* dev_cleanup */
 };