X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ls-caps-vendor.c;h=62ee586dcd6de978162cb8e5c7b813fe7fe4df96;hb=90d270fa720862ee357735b494a0b58643a27061;hp=dc24f90002a2f7bc1753d38b465f0af1ff829387;hpb=6ebebbaa0370c1b34a6aae9f25682ecd1c6c22b1;p=pciutils.git diff --git a/ls-caps-vendor.c b/ls-caps-vendor.c index dc24f90..62ee586 100644 --- a/ls-caps-vendor.c +++ b/ls-caps-vendor.c @@ -3,7 +3,9 @@ * * Copyright (c) 2014 Gerd Hoffmann * - * Can be freely distributed and used under the terms of the GNU GPL. + * Can be freely distributed and used under the terms of the GNU GPL v2+. + * + * SPDX-License-Identifier: GPL-2.0-or-later */ #include @@ -62,11 +64,11 @@ show_vendor_caps_virtio(struct device *d, int where, int cap) static int do_show_vendor_caps(struct device *d, int where, int cap) { - switch (get_conf_word(d, PCI_VENDOR_ID)) + switch (d->dev->vendor_id) { case 0x1af4: /* Red Hat */ - if (get_conf_word(d, PCI_DEVICE_ID) >= 0x1000 && - get_conf_word(d, PCI_DEVICE_ID) <= 0x107f) + if (d->dev->device_id >= 0x1000 && + d->dev->device_id <= 0x107f) return show_vendor_caps_virtio(d, where, cap); break; }