diff options
author | Edward O'Callaghan <eocallaghan@alterapraxis.com> | 2014-10-21 07:43:41 +1100 |
---|---|---|
committer | Edward O'Callaghan <eocallaghan@alterapraxis.com> | 2014-10-27 12:51:00 +0100 |
commit | f21bdc3020b24cce585c4df69b06913177c94182 (patch) | |
tree | 622d01b8c806f0e69c098b0c87fc899f4ba1754d /src/superio/smsc/lpc47n227 | |
parent | 85836c2215498ff18746b3a7e85ed684cf2e119e (diff) |
superio/*/superio.c: Don't hide pointer types behind typedefs
Hiding pointer types behind 'typedef's is usually not a great
idea at the best of times. Worse the typedef becomes an integer
at different stages in Coreboot. Let us refrain from doing this
at all.
Change-Id: Ia2ca8c98bb489daaa58f379433875864f6efabc8
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/7136
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/superio/smsc/lpc47n227')
-rw-r--r-- | src/superio/smsc/lpc47n227/superio.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/superio/smsc/lpc47n227/superio.c b/src/superio/smsc/lpc47n227/superio.c index b1ef18a5d2..dced0f3795 100644 --- a/src/superio/smsc/lpc47n227/superio.c +++ b/src/superio/smsc/lpc47n227/superio.c @@ -32,18 +32,18 @@ #include "lpc47n227.h" /* Forward declarations. */ -static void enable_dev(device_t dev); -void lpc47n227_pnp_set_resources(device_t dev); -void lpc47n227_pnp_enable_resources(device_t dev); -void lpc47n227_pnp_enable(device_t dev); -static void lpc47n227_init(device_t dev); -static void lpc47n227_pnp_set_resource(device_t dev, struct resource *resource); -void lpc47n227_pnp_set_iobase(device_t dev, u16 iobase); -void lpc47n227_pnp_set_drq(device_t dev, u8 drq); -void lpc47n227_pnp_set_irq(device_t dev, u8 irq); -void lpc47n227_pnp_set_enable(device_t dev, int enable); -static void pnp_enter_conf_state(device_t dev); -static void pnp_exit_conf_state(device_t dev); +static void enable_dev(struct device *dev); +void lpc47n227_pnp_set_resources(struct device *dev); +void lpc47n227_pnp_enable_resources(struct device *dev); +void lpc47n227_pnp_enable(struct device *dev); +static void lpc47n227_init(struct device *dev); +static void lpc47n227_pnp_set_resource(struct device *dev, struct resource *resource); +void lpc47n227_pnp_set_iobase(struct device *dev, u16 iobase); +void lpc47n227_pnp_set_drq(struct device *dev, u8 drq); +void lpc47n227_pnp_set_irq(struct device *dev, u8 irq); +void lpc47n227_pnp_set_enable(struct device *dev, int enable); +static void pnp_enter_conf_state(struct device *dev); +static void pnp_exit_conf_state(struct device *dev); struct chip_operations superio_smsc_lpc47n227_ops = { CHIP_NAME("SMSC LPC47N227 Super I/O") @@ -71,7 +71,7 @@ static struct pnp_info pnp_dev_info[] = { * * @param dev Pointer to structure describing a Super I/O device. */ -static void enable_dev(device_t dev) +static void enable_dev(struct device *dev) { pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info); @@ -86,7 +86,7 @@ static void enable_dev(device_t dev) * * @param dev Pointer to structure describing a Super I/O device. */ -void lpc47n227_pnp_set_resources(device_t dev) +void lpc47n227_pnp_set_resources(struct device *dev) { struct resource *res; @@ -100,7 +100,7 @@ void lpc47n227_pnp_set_resources(device_t dev) * NOTE: Cannot use pnp_enable_resources() here because it assumes chip * support for logical devices, which the LPC47N227 doesn't have. */ -void lpc47n227_pnp_enable_resources(device_t dev) +void lpc47n227_pnp_enable_resources(struct device *dev) { pnp_enter_conf_state(dev); lpc47n227_pnp_set_enable(dev, 1); @@ -111,7 +111,7 @@ void lpc47n227_pnp_enable_resources(device_t dev) * NOTE: Cannot use pnp_set_enable() here because it assumes chip * support for logical devices, which the LPC47N227 doesn't have. */ -void lpc47n227_pnp_enable(device_t dev) +void lpc47n227_pnp_enable(struct device *dev) { pnp_enter_conf_state(dev); lpc47n227_pnp_set_enable(dev, !!dev->enabled); @@ -126,7 +126,7 @@ void lpc47n227_pnp_enable(device_t dev) * * @param dev Pointer to structure describing a Super I/O device. */ -static void lpc47n227_init(device_t dev) +static void lpc47n227_init(struct device *dev) { if (!dev->enabled) @@ -140,7 +140,7 @@ static void lpc47n227_init(device_t dev) } } -static void lpc47n227_pnp_set_resource(device_t dev, struct resource *resource) +static void lpc47n227_pnp_set_resource(struct device *dev, struct resource *resource) { if (!(resource->flags & IORESOURCE_ASSIGNED)) { printk(BIOS_ERR, "ERROR: %s %02lx not allocated\n", @@ -169,7 +169,7 @@ static void lpc47n227_pnp_set_resource(device_t dev, struct resource *resource) report_resource_stored(dev, resource, ""); } -void lpc47n227_pnp_set_iobase(device_t dev, u16 iobase) +void lpc47n227_pnp_set_iobase(struct device *dev, u16 iobase) { ASSERT(!(iobase & 0x3)); @@ -191,7 +191,7 @@ void lpc47n227_pnp_set_iobase(device_t dev, u16 iobase) } } -void lpc47n227_pnp_set_drq(device_t dev, u8 drq) +void lpc47n227_pnp_set_drq(struct device *dev, u8 drq) { const u8 PP_DMA_MASK = 0x0F; const u8 PP_DMA_SELECTION_REGISTER = 0x26; @@ -208,7 +208,7 @@ void lpc47n227_pnp_set_drq(device_t dev, u8 drq) } } -void lpc47n227_pnp_set_irq(device_t dev, u8 irq) +void lpc47n227_pnp_set_irq(struct device *dev, u8 irq) { u8 irq_config_register = 0, irq_config_mask = 0; u8 current_config, new_config; @@ -239,7 +239,7 @@ void lpc47n227_pnp_set_irq(device_t dev, u8 irq) pnp_write_config(dev, irq_config_register, new_config); } -void lpc47n227_pnp_set_enable(device_t dev, int enable) +void lpc47n227_pnp_set_enable(struct device *dev, int enable) { u8 power_register = 0, power_mask = 0, current_power, new_power; @@ -276,12 +276,12 @@ void lpc47n227_pnp_set_enable(device_t dev, int enable) pnp_write_config(dev, power_register, new_power); } -static void pnp_enter_conf_state(device_t dev) +static void pnp_enter_conf_state(struct device *dev) { outb(0x55, dev->path.pnp.port); } -static void pnp_exit_conf_state(device_t dev) +static void pnp_exit_conf_state(struct device *dev) { outb(0xaa, dev->path.pnp.port); } |