pci_ops.{c,h}: Don't hide pointers behind typedefs

Change-Id: I7cf7c236f94314d7970b19063d73db788c8267e5
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/7227
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
diff --git a/src/device/pci_ops.c b/src/device/pci_ops.c
index 5b633c8..6ddb493 100644
--- a/src/device/pci_ops.c
+++ b/src/device/pci_ops.c
@@ -34,7 +34,7 @@
 #endif
 }
 
-static const struct pci_bus_operations *pci_bus_ops(struct bus *bus, device_t dev)
+static const struct pci_bus_operations *pci_bus_ops(struct bus *bus, struct device *dev)
 {
 	const struct pci_bus_operations *bops;
 	bops = NULL;
@@ -50,7 +50,7 @@
  * The only consumer of the return value of get_pbus() is pci_bus_ops().
  * pci_bus_ops() can handle being passed NULL and auto-picks working ops.
  */
-static struct bus *get_pbus(device_t dev)
+static struct bus *get_pbus(struct device *dev)
 {
 	struct bus *pbus = NULL;
 
@@ -82,42 +82,42 @@
 	return pbus;
 }
 
-u8 pci_read_config8(device_t dev, unsigned int where)
+u8 pci_read_config8(struct device *dev, unsigned int where)
 {
 	struct bus *pbus = get_pbus(dev);
 	return pci_bus_ops(pbus, dev)->read8(pbus, dev->bus->secondary,
 					dev->path.pci.devfn, where);
 }
 
-u16 pci_read_config16(device_t dev, unsigned int where)
+u16 pci_read_config16(struct device *dev, unsigned int where)
 {
 	struct bus *pbus = get_pbus(dev);
 	return pci_bus_ops(pbus, dev)->read16(pbus, dev->bus->secondary,
 					 dev->path.pci.devfn, where);
 }
 
-u32 pci_read_config32(device_t dev, unsigned int where)
+u32 pci_read_config32(struct device *dev, unsigned int where)
 {
 	struct bus *pbus = get_pbus(dev);
 	return pci_bus_ops(pbus, dev)->read32(pbus, dev->bus->secondary,
 					 dev->path.pci.devfn, where);
 }
 
-void pci_write_config8(device_t dev, unsigned int where, u8 val)
+void pci_write_config8(struct device *dev, unsigned int where, u8 val)
 {
 	struct bus *pbus = get_pbus(dev);
 	pci_bus_ops(pbus, dev)->write8(pbus, dev->bus->secondary,
 				  dev->path.pci.devfn, where, val);
 }
 
-void pci_write_config16(device_t dev, unsigned int where, u16 val)
+void pci_write_config16(struct device *dev, unsigned int where, u16 val)
 {
 	struct bus *pbus = get_pbus(dev);
 	pci_bus_ops(pbus, dev)->write16(pbus, dev->bus->secondary,
 				   dev->path.pci.devfn, where, val);
 }
 
-void pci_write_config32(device_t dev, unsigned int where, u32 val)
+void pci_write_config32(struct device *dev, unsigned int where, u32 val)
 {
 	struct bus *pbus = get_pbus(dev);
 	pci_bus_ops(pbus, dev)->write32(pbus, dev->bus->secondary,
@@ -125,42 +125,42 @@
 }
 
 #if CONFIG_MMCONF_SUPPORT
-u8 pci_mmio_read_config8(device_t dev, unsigned int where)
+u8 pci_mmio_read_config8(struct device *dev, unsigned int where)
 {
 	struct bus *pbus = get_pbus(dev);
 	return pci_ops_mmconf.read8(pbus, dev->bus->secondary,
 				    dev->path.pci.devfn, where);
 }
 
-u16 pci_mmio_read_config16(device_t dev, unsigned int where)
+u16 pci_mmio_read_config16(struct device *dev, unsigned int where)
 {
 	struct bus *pbus = get_pbus(dev);
 	return pci_ops_mmconf.read16(pbus, dev->bus->secondary,
 				     dev->path.pci.devfn, where);
 }
 
-u32 pci_mmio_read_config32(device_t dev, unsigned int where)
+u32 pci_mmio_read_config32(struct device *dev, unsigned int where)
 {
 	struct bus *pbus = get_pbus(dev);
 	return pci_ops_mmconf.read32(pbus, dev->bus->secondary,
 				     dev->path.pci.devfn, where);
 }
 
-void pci_mmio_write_config8(device_t dev, unsigned int where, u8 val)
+void pci_mmio_write_config8(struct device *dev, unsigned int where, u8 val)
 {
 	struct bus *pbus = get_pbus(dev);
 	pci_ops_mmconf.write8(pbus, dev->bus->secondary, dev->path.pci.devfn,
 			      where, val);
 }
 
-void pci_mmio_write_config16(device_t dev, unsigned int where, u16 val)
+void pci_mmio_write_config16(struct device *dev, unsigned int where, u16 val)
 {
 	struct bus *pbus = get_pbus(dev);
 	pci_ops_mmconf.write16(pbus, dev->bus->secondary, dev->path.pci.devfn,
 			       where, val);
 }
 
-void pci_mmio_write_config32(device_t dev, unsigned int where, u32 val)
+void pci_mmio_write_config32(struct device *dev, unsigned int where, u32 val)
 {
 	struct bus *pbus = get_pbus(dev);
 	pci_ops_mmconf.write32(pbus, dev->bus->secondary, dev->path.pci.devfn,
diff --git a/src/include/device/pci_ops.h b/src/include/device/pci_ops.h
index ae58a01..920475a 100644
--- a/src/include/device/pci_ops.h
+++ b/src/include/device/pci_ops.h
@@ -6,20 +6,20 @@
 #include <arch/pci_ops.h>
 
 #ifndef __SIMPLE_DEVICE__
-u8 pci_read_config8(device_t dev, unsigned int where);
-u16 pci_read_config16(device_t dev, unsigned int where);
-u32 pci_read_config32(device_t dev, unsigned int where);
-void pci_write_config8(device_t dev, unsigned int where, u8 val);
-void pci_write_config16(device_t dev, unsigned int where, u16 val);
-void pci_write_config32(device_t dev, unsigned int where, u32 val);
+u8 pci_read_config8(struct device *dev, unsigned int where);
+u16 pci_read_config16(struct device *dev, unsigned int where);
+u32 pci_read_config32(struct device *dev, unsigned int where);
+void pci_write_config8(struct device *dev, unsigned int where, u8 val);
+void pci_write_config16(struct device *dev, unsigned int where, u16 val);
+void pci_write_config32(struct device *dev, unsigned int where, u32 val);
 
 #if CONFIG_MMCONF_SUPPORT
-u8 pci_mmio_read_config8(device_t dev, unsigned int where);
-u16 pci_mmio_read_config16(device_t dev, unsigned int where);
-u32 pci_mmio_read_config32(device_t dev, unsigned int where);
-void pci_mmio_write_config8(device_t dev, unsigned int where, u8 val);
-void pci_mmio_write_config16(device_t dev, unsigned int where, u16 val);
-void pci_mmio_write_config32(device_t dev, unsigned int where, u32 val);
+u8 pci_mmio_read_config8(struct device *dev, unsigned int where);
+u16 pci_mmio_read_config16(struct device *dev, unsigned int where);
+u32 pci_mmio_read_config32(struct device *dev, unsigned int where);
+void pci_mmio_write_config8(struct device *dev, unsigned int where, u8 val);
+void pci_mmio_write_config16(struct device *dev, unsigned int where, u16 val);
+void pci_mmio_write_config32(struct device *dev, unsigned int where, u32 val);
 #endif
 #endif