Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/riastradh-drm2]: src/sys/external/bsd/drm2/include/linux Fix struct pci_...
details: https://anonhg.NetBSD.org/src/rev/a63b2a243d96
branches: riastradh-drm2
changeset: 788334:a63b2a243d96
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 03:18:24 2013 +0000
description:
Fix struct pci_dev::dev in <linux/pci.h>.
Linux code expects it to be a struct device and takes its address,
but we can't arrange for the actual struct device to go there.
diffstat:
sys/external/bsd/drm2/include/linux/pci.h | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r 58bd75e5fb28 -r a63b2a243d96 sys/external/bsd/drm2/include/linux/pci.h
--- a/sys/external/bsd/drm2/include/linux/pci.h Wed Jul 24 03:18:05 2013 +0000
+++ b/sys/external/bsd/drm2/include/linux/pci.h Wed Jul 24 03:18:24 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci.h,v 1.1.2.10 2013/07/24 03:16:47 riastradh Exp $ */
+/* $NetBSD: pci.h,v 1.1.2.11 2013/07/24 03:18:24 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
struct pci_dev {
struct pci_attach_args pd_pa;
bool pd_kludged; /* XXX pci_kludgey_find_dev */
- device_t dev;
+ device_t pd_dev;
struct pci_bus *bus;
uint32_t devfn;
uint16_t vendor;
@@ -78,6 +78,12 @@
bool msi_enabled;
};
+static inline device_t
+pci_dev_dev(struct pci_dev *pdev)
+{
+ return pdev->pd_dev;
+}
+
#define PCI_DEVFN(DEV, FN) \
(__SHIFTIN((DEV), __BITS(3, 7)) | __SHIFTIN((FN), __BITS(0, 2)))
#define PCI_SLOT(DEVFN) __SHIFTOUT((DEVFN), __BITS(3, 7))
Home |
Main Index |
Thread Index |
Old Index