Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107083530
D34772.id104570.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D34772.id104570.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D34772: linuxkpi: Move lkpi_pci_devres_get_alloc into .c file
Attached
Detach File
Event Timeline
Log In to Comment