Module Name:    src
Committed By:   matt
Date:           Wed Jun 22 18:03:30 UTC 2011

Modified Files:
        src/sys/dev/pci: pcivar.h

Log Message:
Add inline accessors for pba_pc and pa_pc so that <machine/pci_machdep.h>
can use them in inline functions.


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/dev/pci/pcivar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/pcivar.h
diff -u src/sys/dev/pci/pcivar.h:1.93 src/sys/dev/pci/pcivar.h:1.94
--- src/sys/dev/pci/pcivar.h:1.93	Tue May 17 17:34:54 2011
+++ src/sys/dev/pci/pcivar.h	Wed Jun 22 18:03:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcivar.h,v 1.93 2011/05/17 17:34:54 dyoung Exp $	*/
+/*	$NetBSD: pcivar.h,v 1.94 2011/06/22 18:03:30 matt Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997 Christopher G. Demetriou.  All rights reserved.
@@ -120,6 +120,16 @@
 };
 
 /*
+ * This is used by <machine/pci_machdep.h> to access the pba_pc member.  It
+ * can't use it directly since pcibus_attach_args has yet to be defined.
+ */
+static inline pci_chipset_tag_t
+pcibus_attach_args_pc(struct pcibus_attach_args *pba)
+{
+	return pba->pba_pc;
+}
+
+/*
  * PCI device attach arguments.
  */
 struct pci_attach_args {
@@ -152,6 +162,16 @@
 };
 
 /*
+ * This is used by <machine/pci_machdep.h> to access the pa_pc member.  It
+ * can't use it directly since pci_attach_args has yet to be defined.
+ */
+static inline pci_chipset_tag_t
+pci_attach_args_pc(const struct pci_attach_args *pa)
+{
+	return pa->pa_pc;
+}
+
+/*
  * Flags given in the bus and device attachment args.
  */
 #define	PCI_FLAGS_IO_OKAY	0x01		/* I/O space is okay */

Reply via email to