Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/linux linux: pci_name
details: https://anonhg.NetBSD.org/src/rev/ea103e71da8d
branches: trunk
changeset: 1028777:ea103e71da8d
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 12:00:16 2021 +0000
description:
linux: pci_name
diffstat:
sys/external/bsd/drm2/include/linux/pci.h | 4 +++-
sys/external/bsd/drm2/linux/linux_pci.c | 12 ++++++++++--
2 files changed, 13 insertions(+), 3 deletions(-)
diffs (58 lines):
diff -r ce081a2374a4 -r ea103e71da8d sys/external/bsd/drm2/include/linux/pci.h
--- a/sys/external/bsd/drm2/include/linux/pci.h Sun Dec 19 12:00:08 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/pci.h Sun Dec 19 12:00:16 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci.h,v 1.49 2021/12/19 11:38:04 riastradh Exp $ */
+/* $NetBSD: pci.h,v 1.50 2021/12/19 12:00:16 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -218,6 +218,7 @@
#define pci_is_root_bus linux_pci_is_root_bus
#define pci_is_thunderbolt_attached linux_pci_is_thunderbolt_attached
#define pci_map_rom linux_pci_map_rom
+#define pci_name linux_pci_name
#define pci_platform_rom linux_pci_platform_rom
#define pci_read_config_byte linux_pci_read_config_byte
#define pci_read_config_dword linux_pci_read_config_dword
@@ -251,6 +252,7 @@
device_t pci_dev_dev(struct pci_dev *);
void pci_set_drvdata(struct pci_dev *, void *);
void * pci_get_drvdata(struct pci_dev *);
+const char * pci_name(struct pci_dev *);
int pci_find_capability(struct pci_dev *, int);
bool pci_is_pcie(struct pci_dev *);
diff -r ce081a2374a4 -r ea103e71da8d sys/external/bsd/drm2/linux/linux_pci.c
--- a/sys/external/bsd/drm2/linux/linux_pci.c Sun Dec 19 12:00:08 2021 +0000
+++ b/sys/external/bsd/drm2/linux/linux_pci.c Sun Dec 19 12:00:16 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_pci.c,v 1.19 2021/12/19 11:38:04 riastradh Exp $ */
+/* $NetBSD: linux_pci.c,v 1.20 2021/12/19 12:00:16 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
#endif
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_pci.c,v 1.19 2021/12/19 11:38:04 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_pci.c,v 1.20 2021/12/19 12:00:16 riastradh Exp $");
#if NACPICA > 0
#include <dev/acpi/acpivar.h>
@@ -65,6 +65,14 @@
return pdev->pd_drvdata;
}
+const char *
+pci_name(struct pci_dev *pdev)
+{
+
+ /* XXX not sure this has the right format */
+ return device_xname(pci_dev_dev(pdev));
+}
+
void
linux_pci_dev_init(struct pci_dev *pdev, device_t dev, device_t parent,
const struct pci_attach_args *pa, int kludges)
Home |
Main Index |
Thread Index |
Old Index