drm/linux: Add pci_name()
authorFrançois Tigeot <ftigeot@wolfpond.org>
Thu, 1 Aug 2019 18:37:12 +0000 (20:37 +0200)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Thu, 1 Aug 2019 18:37:12 +0000 (20:37 +0200)
Obtained-from: FreeBSD

sys/dev/drm/include/linux/pci.h

index 11bf03d..6c84312 100644 (file)
@@ -316,6 +316,12 @@ pci_bus_read_config_word(struct pci_bus *bus, unsigned int devfn, int where, u16
        return 0;
 }
 
+static inline const char *
+pci_name(struct pci_dev *pdev)
+{
+       return device_get_desc(pdev->dev.bsddev);
+}
+
 static inline void *
 pci_get_drvdata(struct pci_dev *pdev)
 {