Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102633402
D34772.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.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h
--- a/sys/compat/linuxkpi/common/include/linux/pci.h
+++ b/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)
{
diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c
--- a/sys/compat/linuxkpi/common/src/linux_pci.c
+++ b/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
Sat, Nov 16, 2:43 AM (11 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14652010
Default Alt Text
D34772.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