Page MenuHomeFreeBSD

D34772.id104570.diff
No OneTemporary

D34772.id104570.diff

Index: sys/compat/linuxkpi/common/include/linux/pci.h
===================================================================
--- sys/compat/linuxkpi/common/include/linux/pci.h
+++ sys/compat/linuxkpi/common/include/linux/pci.h
@@ -318,6 +318,7 @@
/* Internal helper function(s). */
struct pci_dev *lkpinew_pci_dev(device_t);
+struct pci_devres *lkpi_pci_devres_get_alloc(struct pci_dev *pdev);
void lkpi_pci_devres_release(struct device *, void *);
void lkpi_pcim_iomap_table_release(struct device *, void *);
@@ -520,21 +521,6 @@
return (pdev->bus->self);
}
-static inline struct pci_devres *
-lkpi_pci_devres_get_alloc(struct pci_dev *pdev)
-{
- struct pci_devres *dr;
-
- dr = lkpi_devres_find(&pdev->dev, lkpi_pci_devres_release, NULL, NULL);
- if (dr == NULL) {
- dr = lkpi_devres_alloc(lkpi_pci_devres_release, sizeof(*dr),
- GFP_KERNEL | __GFP_ZERO);
- if (dr != NULL)
- lkpi_devres_add(&pdev->dev, dr);
- }
-
- return (dr);
-}
static inline struct pci_devres *
lkpi_pci_devres_find(struct pci_dev *pdev)
{
Index: sys/compat/linuxkpi/common/src/linux_pci.c
===================================================================
--- sys/compat/linuxkpi/common/src/linux_pci.c
+++ sys/compat/linuxkpi/common/src/linux_pci.c
@@ -509,6 +509,22 @@
return (0);
}
+struct pci_devres *
+lkpi_pci_devres_get_alloc(struct pci_dev *pdev)
+{
+ struct pci_devres *dr;
+
+ dr = lkpi_devres_find(&pdev->dev, lkpi_pci_devres_release, NULL, NULL);
+ if (dr == NULL) {
+ dr = lkpi_devres_alloc(lkpi_pci_devres_release, sizeof(*dr),
+ GFP_KERNEL | __GFP_ZERO);
+ if (dr != NULL)
+ lkpi_devres_add(&pdev->dev, dr);
+ }
+
+ return (dr);
+}
+
void
lkpi_pci_devres_release(struct device *dev, void *p)
{

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 10, 8:46 PM (7 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15746408
Default Alt Text
D34772.id104570.diff (1 KB)

Event Timeline