Edward O'Callaghan (eocallaghan@alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7146
-gerrit
commit 6215009df928d40cf8c5ff9d102a33f631241827 Author: Edward O'Callaghan eocallaghan@alterapraxis.com Date: Wed Oct 22 13:39:12 2014 +1100
{arch,cpu,drivers,ec}: Don't hide pointers behind typedefs
Change-Id: Id88bb4367d6045f6fbf185f0562ac72c04ee5f84 Signed-off-by: Edward O'Callaghan eocallaghan@alterapraxis.com --- src/arch/x86/boot/acpi.c | 6 +++--- src/arch/x86/boot/mpspec.c | 6 ++++-- src/arch/x86/boot/smbios.c | 6 +++--- src/cpu/allwinner/a10/cpu.c | 8 ++++---- src/drivers/ati/ragexl/xlinit.c | 2 +- src/drivers/dec/21143/21143.c | 2 +- src/drivers/emulation/qemu/bochs.c | 2 +- src/drivers/emulation/qemu/cirrus.c | 2 +- src/drivers/generic/ioapic/ioapic.c | 8 ++++---- src/drivers/i2c/adm1026/adm1026.c | 6 +++--- src/drivers/i2c/adm1027/adm1027.c | 6 +++--- src/drivers/i2c/adt7463/adt7463.c | 4 ++-- src/drivers/i2c/at24rf08c/at24rf08c.c | 6 +++--- src/drivers/i2c/at24rf08c/lenovo_serials.c | 14 +++++++------- src/drivers/i2c/i2cmux/i2cmux.c | 4 ++-- src/drivers/i2c/i2cmux2/i2cmux2.c | 4 ++-- src/drivers/i2c/lm63/lm63.c | 4 ++-- src/drivers/i2c/rtd2132/rtd2132.c | 24 ++++++++++++------------ src/drivers/i2c/w83793/w83793.c | 18 +++++++++--------- src/drivers/i2c/w83795/w83795.c | 6 +++--- src/drivers/ics/954309/ics954309.c | 4 ++-- src/ec/compal/ene932/ec.c | 8 ++++---- src/ec/google/chromeec/ec_lpc.c | 8 ++++---- src/ec/kontron/it8516e/ec.c | 4 ++-- src/ec/lenovo/h8/h8.c | 4 ++-- src/ec/lenovo/pmh7/pmh7.c | 2 +- src/ec/quanta/ene_kb3940q/ec.c | 8 ++++---- src/ec/quanta/it8518/ec.c | 8 ++++---- src/ec/smsc/mec1308/ec.c | 2 +- 29 files changed, 94 insertions(+), 92 deletions(-)
diff --git a/src/arch/x86/boot/acpi.c b/src/arch/x86/boot/acpi.c index c3c946d..b506cb4 100644 --- a/src/arch/x86/boot/acpi.c +++ b/src/arch/x86/boot/acpi.c @@ -141,7 +141,7 @@ int acpi_create_madt_lapic(acpi_madt_lapic_t *lapic, u8 cpu, u8 apic)
unsigned long acpi_create_madt_lapics(unsigned long current) { - device_t cpu; + struct device *cpu; int index = 0;
for (cpu = all_devices; cpu; cpu = cpu->next) { @@ -278,7 +278,7 @@ void acpi_create_ssdt_generator(acpi_header_t *ssdt, const char *oem_table_id) acpigen_set_current((char *) current); { #if IS_ENABLED(CONFIG_PER_DEVICE_ACPI_TABLES) - device_t dev; + struct device *dev; for (dev = all_devices; dev; dev = dev->next) if (dev->ops && dev->ops->acpi_fill_ssdt_generator) { dev->ops->acpi_fill_ssdt_generator(); @@ -708,7 +708,7 @@ unsigned long write_acpi_tables(unsigned long start) acpi_header_t *dsdt; acpi_mcfg_t *mcfg; acpi_madt_t *madt; - device_t dev; + struct device *dev;
current = start;
diff --git a/src/arch/x86/boot/mpspec.c b/src/arch/x86/boot/mpspec.c index d079d08..8049be4 100644 --- a/src/arch/x86/boot/mpspec.c +++ b/src/arch/x86/boot/mpspec.c @@ -166,7 +166,7 @@ void smp_write_processors(struct mp_config_table *mc) unsigned cpu_features; unsigned cpu_feature_flags; struct cpuid_result result; - device_t cpu; + struct device *cpu;
boot_apic_id = lapicid(); apic_version = lapic_read(LAPIC_LVR) & 0xff; @@ -493,7 +493,9 @@ unsigned long __attribute__((weak)) write_smp_table(unsigned long addr) struct drivers_generic_ioapic_config *ioapic_config; struct mp_config_table *mc; int isa_bus, pin, parentpin; - device_t dev, parent, oldparent; + struct device *dev; + struct device *parent; + struct device *oldparent; void *tmp, *v; int isaioapic = -1, have_fixed_entries;
diff --git a/src/arch/x86/boot/smbios.c b/src/arch/x86/boot/smbios.c index 724def3..64889f7 100644 --- a/src/arch/x86/boot/smbios.c +++ b/src/arch/x86/boot/smbios.c @@ -303,7 +303,7 @@ static int smbios_write_type11(unsigned long *current, int *handle) { struct smbios_type11 *t = (struct smbios_type11 *)*current; int len; - device_t dev; + struct device *dev;
memset(t, 0, sizeof *t); t->type = SMBIOS_OEM_STRINGS; @@ -379,9 +379,9 @@ static int smbios_write_type127(unsigned long *current, int handle) return len; }
-static int smbios_walk_device_tree(device_t tree, int *handle, unsigned long *current) +static int smbios_walk_device_tree(struct device *tree, int *handle, unsigned long *current) { - device_t dev; + struct device *dev; int len = 0;
for(dev = tree; dev; dev = dev->next) { diff --git a/src/cpu/allwinner/a10/cpu.c b/src/cpu/allwinner/a10/cpu.c index e0d4cdf..fac5730 100644 --- a/src/cpu/allwinner/a10/cpu.c +++ b/src/cpu/allwinner/a10/cpu.c @@ -11,7 +11,7 @@ #include <cbmem.h>
-static void cpu_enable_resources(device_t dev) +static void cpu_enable_resources(struct device *dev) { ram_resource(dev, 0, CONFIG_SYS_SDRAM_BASE >> 10, CONFIG_DRAM_SIZE_MB << 10); @@ -20,12 +20,12 @@ static void cpu_enable_resources(device_t dev) */ }
-static void cpu_init(device_t dev) +static void cpu_init(struct device *dev) { /* TODO: Check if anything else needs to be explicitly initialized */ }
-static void cpu_noop(device_t dev) +static void cpu_noop(struct device *dev) { }
@@ -37,7 +37,7 @@ static struct device_operations cpu_ops = { .scan_bus = NULL, };
-static void a1x_cpu_enable_dev(device_t dev) +static void a1x_cpu_enable_dev(struct device *dev) { dev->ops = &cpu_ops; } diff --git a/src/drivers/ati/ragexl/xlinit.c b/src/drivers/ati/ragexl/xlinit.c index cdcb862..41cea72 100644 --- a/src/drivers/ati/ragexl/xlinit.c +++ b/src/drivers/ati/ragexl/xlinit.c @@ -489,7 +489,7 @@ static void aty_calc_mem_refresh(struct fb_info_aty *info, u16 id, int xclk) info->mem_refresh_rate = i; } #endif /*CONFIG_CONSOLE_BTEXT */ -static void ati_ragexl_init(device_t dev) +static void ati_ragexl_init(struct device *dev) { u32 chip_id; int j; diff --git a/src/drivers/dec/21143/21143.c b/src/drivers/dec/21143/21143.c index 7ce3d6b..b26b22c 100644 --- a/src/drivers/dec/21143/21143.c +++ b/src/drivers/dec/21143/21143.c @@ -24,7 +24,7 @@ #include <device/pci_ids.h> #include <console/console.h>
-static void dec_21143_enable(device_t dev) +static void dec_21143_enable(struct device *dev) { printk(BIOS_DEBUG, "Initializing DECchip 21143\n");
diff --git a/src/drivers/emulation/qemu/bochs.c b/src/drivers/emulation/qemu/bochs.c index f2e4dfb..cb0075a 100644 --- a/src/drivers/emulation/qemu/bochs.c +++ b/src/drivers/emulation/qemu/bochs.c @@ -58,7 +58,7 @@ static int bochs_read(int index) } #endif
-static void bochs_init(device_t dev) +static void bochs_init(struct device *dev) { #if IS_ENABLED(CONFIG_FRAMEBUFFER_KEEP_VESA_MODE) struct edid edid; diff --git a/src/drivers/emulation/qemu/cirrus.c b/src/drivers/emulation/qemu/cirrus.c index c96e032..1c659eb 100644 --- a/src/drivers/emulation/qemu/cirrus.c +++ b/src/drivers/emulation/qemu/cirrus.c @@ -212,7 +212,7 @@ write_hidden_dac (uint8_t data) } #endif
-static void cirrus_init(device_t dev) +static void cirrus_init(struct device *dev) { #if IS_ENABLED(CONFIG_FRAMEBUFFER_KEEP_VESA_MODE) uint8_t cr_ext, cr_overlay; diff --git a/src/drivers/generic/ioapic/ioapic.c b/src/drivers/generic/ioapic/ioapic.c index 42b2f07..3d62a7c 100644 --- a/src/drivers/generic/ioapic/ioapic.c +++ b/src/drivers/generic/ioapic/ioapic.c @@ -12,7 +12,7 @@ #include <arch/io.h> #include <cpu/x86/lapic.h>
-static void ioapic_init(device_t dev) +static void ioapic_init(struct device *dev) { struct drivers_generic_ioapic_config *config = dev->chip_info; u32 bsp_lapicid = lapicid(); @@ -86,15 +86,15 @@ static void ioapic_init(device_t dev) } }
-static void ioapic_enable_resources(device_t dev) +static void ioapic_enable_resources(struct device *dev) { }
-static void ioapic_nop(device_t dummy) +static void ioapic_nop(struct device * dummy) { }
-static void ioapic_read_resources(device_t dev) +static void ioapic_read_resources(struct device *dev) { struct drivers_generic_ioapic_config *config = (struct drivers_generic_ioapic_config *)dev->chip_info; struct resource *res; diff --git a/src/drivers/i2c/adm1026/adm1026.c b/src/drivers/i2c/adm1026/adm1026.c index ab85eb5..305972f 100644 --- a/src/drivers/i2c/adm1026/adm1026.c +++ b/src/drivers/i2c/adm1026/adm1026.c @@ -19,7 +19,7 @@ #define ADM1026_REG_CONFIG2 0x01 #define ADM1026_REG_CONFIG3 0x07
-static void adm1026_enable_monitoring(device_t dev) +static void adm1026_enable_monitoring(struct device *dev) { int result; result = smbus_read_byte(dev, ADM1026_REG_CONFIG1); @@ -33,7 +33,7 @@ static void adm1026_enable_monitoring(device_t dev) } }
-static void adm1026_init(device_t dev) +static void adm1026_init(struct device *dev) { if (dev->enabled && dev->path.type == DEVICE_PATH_I2C) { if (ops_smbus_bus(get_pbus_smbus(dev))) { @@ -44,7 +44,7 @@ static void adm1026_init(device_t dev) } }
-static void adm1026_noop(device_t dummy) +static void adm1026_noop(struct device * dummy) { }
diff --git a/src/drivers/i2c/adm1027/adm1027.c b/src/drivers/i2c/adm1027/adm1027.c index e83f2c4..1fc50de 100644 --- a/src/drivers/i2c/adm1027/adm1027.c +++ b/src/drivers/i2c/adm1027/adm1027.c @@ -18,7 +18,7 @@ #define ADM1027_REG_CONFIG2 0x73 #define ADM1027_REG_CONFIG3 0x78
-static void adm1027_enable_monitoring(device_t dev) +static void adm1027_enable_monitoring(struct device *dev) { int result;
@@ -39,7 +39,7 @@ static void adm1027_enable_monitoring(device_t dev) printk(BIOS_DEBUG, "ADM1027: monitoring enabled\n"); }
-static void adm1027_init(device_t dev) +static void adm1027_init(struct device *dev) { if (dev->enabled && dev->path.type == DEVICE_PATH_I2C) { if (ops_smbus_bus(get_pbus_smbus(dev))) { @@ -50,7 +50,7 @@ static void adm1027_init(device_t dev) } }
-static void adm1027_noop(device_t dummy) +static void adm1027_noop(struct device * dummy) { }
diff --git a/src/drivers/i2c/adt7463/adt7463.c b/src/drivers/i2c/adt7463/adt7463.c index 9ca9f37..3146dbb 100644 --- a/src/drivers/i2c/adt7463/adt7463.c +++ b/src/drivers/i2c/adt7463/adt7463.c @@ -32,7 +32,7 @@ * See Analog Devices ADT7463 datasheet, Rev C (2004): * http://www.analog.com/en/prod/0,,766_825_ADT7463,00.html */ -static void adt7463_init(device_t adt7463) +static void adt7463_init(struct device * adt7463) { int result;
@@ -85,7 +85,7 @@ static void adt7463_init(device_t adt7463) printk(BIOS_DEBUG, "ADT7463 properly initialized\n"); }
-static void adt7463_noop(device_t dummy) +static void adt7463_noop(struct device * dummy) { }
diff --git a/src/drivers/i2c/at24rf08c/at24rf08c.c b/src/drivers/i2c/at24rf08c/at24rf08c.c index a9cf2c5..870c11a 100644 --- a/src/drivers/i2c/at24rf08c/at24rf08c.c +++ b/src/drivers/i2c/at24rf08c/at24rf08c.c @@ -25,7 +25,7 @@ #include <smbios.h> #include <console/console.h>
-static void at24rf08c_init(device_t dev) +static void at24rf08c_init(struct device *dev) { int i, j;
@@ -52,7 +52,7 @@ static void at24rf08c_init(device_t dev) printk (BIOS_DEBUG, "init EEPROM done\n"); }
-static void at24rf08c_noop(device_t dummy) +static void at24rf08c_noop(struct device * dummy) { }
@@ -63,7 +63,7 @@ static struct device_operations at24rf08c_operations = { .init = at24rf08c_init, };
-static void enable_dev(device_t dev) +static void enable_dev(struct device *dev) { dev->ops = &at24rf08c_operations; } diff --git a/src/drivers/i2c/at24rf08c/lenovo_serials.c b/src/drivers/i2c/at24rf08c/lenovo_serials.c index 53e76da..8cd1e1b 100644 --- a/src/drivers/i2c/at24rf08c/lenovo_serials.c +++ b/src/drivers/i2c/at24rf08c/lenovo_serials.c @@ -28,16 +28,16 @@
#define ERROR_STRING "*INVALID*"
-static device_t at24rf08c_find_bank(u8 bank) +static struct device * at24rf08c_find_bank(u8 bank) { - device_t dev; + struct device *dev; dev = dev_find_slot_on_smbus(1, 0x54 | bank); if (!dev) printk(BIOS_WARNING, "EEPROM not found\n"); return dev; }
-static int at24rf08c_read_byte(device_t dev, u8 addr) +static int at24rf08c_read_byte(struct device *dev, u8 addr) { int t = -1; int j; @@ -54,7 +54,7 @@ static int at24rf08c_read_byte(device_t dev, u8 addr) return t; }
-static void at24rf08c_read_string_dev(device_t dev, u8 start, +static void at24rf08c_read_string_dev(struct device *dev, u8 start, u8 len, char *result) { int i; @@ -72,7 +72,7 @@ static void at24rf08c_read_string_dev(device_t dev, u8 start,
static void at24rf08c_read_string(u8 bank, u8 start, u8 len, char *result) { - device_t dev; + struct device *dev;
dev = at24rf08c_find_bank(bank); if (dev == 0) { @@ -124,7 +124,7 @@ void smbios_mainboard_set_uuid(u8 *uuid) static char result[16]; unsigned i; static int already_read; - device_t dev; + struct device *dev; const int remap[16] = { /* UUID byteswap. */ 3, 2, 1, 0, 5, 4, 7, 6, 8, 9, 10, 11, 12, 13, 14, 15 @@ -173,7 +173,7 @@ const char *smbios_mainboard_version(void) { static char result[100]; static int already_read; - device_t dev; + struct device *dev; int len;
if (already_read) diff --git a/src/drivers/i2c/i2cmux/i2cmux.c b/src/drivers/i2c/i2cmux/i2cmux.c index b318508..256569c 100644 --- a/src/drivers/i2c/i2cmux/i2cmux.c +++ b/src/drivers/i2c/i2cmux/i2cmux.c @@ -6,7 +6,7 @@ #include <device/pci_ops.h> #include <cpu/x86/msr.h>
-static void i2cmux_set_link(device_t dev, unsigned int link) +static void i2cmux_set_link(struct device *dev, unsigned int link) { if (dev->enabled && dev->path.type == DEVICE_PATH_I2C) { if (ops_smbus_bus(get_pbus_smbus(dev))) { @@ -16,7 +16,7 @@ static void i2cmux_set_link(device_t dev, unsigned int link) } }
-static void i2cmux_noop(device_t dummy) +static void i2cmux_noop(struct device * dummy) { }
diff --git a/src/drivers/i2c/i2cmux2/i2cmux2.c b/src/drivers/i2c/i2cmux2/i2cmux2.c index a7d40e2..287784c 100644 --- a/src/drivers/i2c/i2cmux2/i2cmux2.c +++ b/src/drivers/i2c/i2cmux2/i2cmux2.c @@ -6,7 +6,7 @@ #include <device/pci_ops.h> #include <cpu/x86/msr.h>
-static void i2cmux2_set_link(device_t dev, unsigned int link) +static void i2cmux2_set_link(struct device *dev, unsigned int link) { if (dev->enabled && dev->path.type == DEVICE_PATH_I2C) { if (ops_smbus_bus(get_pbus_smbus(dev))) { @@ -15,7 +15,7 @@ static void i2cmux2_set_link(device_t dev, unsigned int link) } }
-static void i2cmux2_noop(device_t dummy) +static void i2cmux2_noop(struct device * dummy) { }
diff --git a/src/drivers/i2c/lm63/lm63.c b/src/drivers/i2c/lm63/lm63.c index 47a5489..80835f3 100644 --- a/src/drivers/i2c/lm63/lm63.c +++ b/src/drivers/i2c/lm63/lm63.c @@ -6,7 +6,7 @@ #include <device/pci_ops.h> #include <cpu/x86/msr.h>
-static void lm63_init(device_t dev) +static void lm63_init(struct device *dev) { int result; if (dev->enabled && dev->path.type == DEVICE_PATH_I2C) { @@ -21,7 +21,7 @@ static void lm63_init(device_t dev) } }
-static void lm63_noop(device_t dummy) +static void lm63_noop(struct device * dummy) { }
diff --git a/src/drivers/i2c/rtd2132/rtd2132.c b/src/drivers/i2c/rtd2132/rtd2132.c index 44333ac..9ccf3b0 100644 --- a/src/drivers/i2c/rtd2132/rtd2132.c +++ b/src/drivers/i2c/rtd2132/rtd2132.c @@ -75,7 +75,7 @@
#define RTD2132_DEBUG_REG 0
-static void rtd2132_write_reg(device_t dev, u8 reg, u8 value) +static void rtd2132_write_reg(struct device *dev, u8 reg, u8 value) { if (RTD2132_DEBUG_REG) printk(BIOS_DEBUG, "RTD2132 0x%02x <- 0x%02x\n", reg, value); @@ -83,18 +83,18 @@ static void rtd2132_write_reg(device_t dev, u8 reg, u8 value) smbus_write_byte(dev, RTD2132_DATA, value); }
-static void rtd2132_firmware_stop(device_t dev) +static void rtd2132_firmware_stop(struct device *dev) { smbus_write_byte(dev, RTD2132_FIRMWARE, RTD2132_FIRMWARE_STOP); mdelay(60); }
-static void rtd2132_firmware_start(device_t dev) +static void rtd2132_firmware_start(struct device *dev) { smbus_write_byte(dev, RTD2132_FIRMWARE, RTD2132_FIRMWARE_START); }
-static void rtd2132_pps(device_t dev, struct drivers_i2c_rtd2132_config *cfg) +static void rtd2132_pps(struct device *dev, struct drivers_i2c_rtd2132_config *cfg) { /* T2, T5, and T7 register values are in units of 4ms. */ rtd2132_write_reg(dev, RTD2132_COMMAND_PWR_SEQ_T1, cfg->t1); @@ -106,7 +106,7 @@ static void rtd2132_pps(device_t dev, struct drivers_i2c_rtd2132_config *cfg) rtd2132_write_reg(dev, RTD2132_COMMAND_PWR_SEQ_T7, cfg->t7 / 4); }
-static void rtd2132_sscg_enable(device_t dev, u8 sscg_percent) +static void rtd2132_sscg_enable(struct device *dev, u8 sscg_percent) { /* SSCG_Config_0 */ rtd2132_write_reg(dev, RTD2132_COMMAND_SSCG_CONFIG_0, @@ -116,7 +116,7 @@ static void rtd2132_sscg_enable(device_t dev, u8 sscg_percent) rtd2132_write_reg(dev, RTD2132_COMMAND_SSCG_CONFIG_1, sscg_percent); }
-static void rtd2132_sscg_disable(device_t dev) +static void rtd2132_sscg_disable(struct device *dev) { /* SSCG_Config_0 */ rtd2132_write_reg(dev, RTD2132_COMMAND_SSCG_CONFIG_0, @@ -127,7 +127,7 @@ static void rtd2132_sscg_disable(device_t dev) RTD2132_SSCG_CONFIG_DISABLED); }
-static void rtd2132_sscg(device_t dev, struct drivers_i2c_rtd2132_config *cfg) +static void rtd2132_sscg(struct device *dev, struct drivers_i2c_rtd2132_config *cfg) { switch (cfg->sscg_percent) { case RTD2132_SSCG_PERCENT_0_0: @@ -152,7 +152,7 @@ static void rtd2132_sscg(device_t dev, struct drivers_i2c_rtd2132_config *cfg) } }
-static void rtd2132_lvds_swap(device_t dev, +static void rtd2132_lvds_swap(struct device *dev, struct drivers_i2c_rtd2132_config *cfg) { u8 swap_value = RTD2132_LVDS_SWAP_NORMAL; @@ -186,7 +186,7 @@ static void rtd2132_lvds_swap(device_t dev, rtd2132_write_reg(dev, RTD2132_COMMAND_LVDS_SWAP, swap_value); }
-static void rtd2132_defaults(device_t dev) +static void rtd2132_defaults(struct device *dev) { static const struct def_setting { u8 reg; @@ -207,7 +207,7 @@ static void rtd2132_defaults(device_t dev) def_settings[i].value); }
-static void rtd2132_setup(device_t dev) +static void rtd2132_setup(struct device *dev) { struct drivers_i2c_rtd2132_config *config = dev->chip_info;
@@ -233,7 +233,7 @@ static void rtd2132_setup(device_t dev) rtd2132_firmware_start(dev); }
-static void rtd2132_init(device_t dev) +static void rtd2132_init(struct device *dev) { if (dev->enabled && dev->path.type == DEVICE_PATH_I2C && ops_smbus_bus(get_pbus_smbus(dev))) { @@ -241,7 +241,7 @@ static void rtd2132_init(device_t dev) } }
-static void rtd2132_noop(device_t dummy) +static void rtd2132_noop(struct device * dummy) { }
diff --git a/src/drivers/i2c/w83793/w83793.c b/src/drivers/i2c/w83793/w83793.c index 8dcfb28..6127085 100644 --- a/src/drivers/i2c/w83793/w83793.c +++ b/src/drivers/i2c/w83793/w83793.c @@ -25,18 +25,18 @@ #include <device/smbus.h> #include "chip.h"
-static int w83793_fan_limit(device_t dev, int fan, uint16_t limit) +static int w83793_fan_limit(struct device *dev, int fan, uint16_t limit) { return smbus_write_byte(dev, 0x90 + fan * 2, limit >> 8) || smbus_write_byte(dev, 0x91 + fan * 2, limit & 0xff); }
-static int w83793_bank(device_t dev, int bank) +static int w83793_bank(struct device *dev, int bank) { return smbus_write_byte(dev, 0, bank); }
-static int w83793_td_level(device_t dev, int fan, const char *level) +static int w83793_td_level(struct device *dev, int fan, const char *level) { fan *= 0x10;
@@ -50,7 +50,7 @@ static int w83793_td_level(device_t dev, int fan, const char *level) return 0; }
-static int w83793_tr_level(device_t dev, int fan, const char *level) +static int w83793_tr_level(struct device *dev, int fan, const char *level) { fan *= 0x10;
@@ -65,7 +65,7 @@ static int w83793_tr_level(device_t dev, int fan, const char *level) }
-static int w83793_td_fan_level(device_t dev, int fan, const char *level) +static int w83793_td_fan_level(struct device *dev, int fan, const char *level) { fan *= 0x10;
@@ -79,7 +79,7 @@ static int w83793_td_fan_level(device_t dev, int fan, const char *level) return 0; }
-static int w83793_tr_fan_level(device_t dev, int fan, const char *level) +static int w83793_tr_fan_level(struct device *dev, int fan, const char *level) { fan *= 0x10;
@@ -94,7 +94,7 @@ static int w83793_tr_fan_level(device_t dev, int fan, const char *level) }
-static void w83793_init(device_t dev) +static void w83793_init(struct device *dev) { struct drivers_i2c_w83793_config *config = dev->chip_info; uint16_t id; @@ -220,7 +220,7 @@ static void w83793_init(device_t dev)
}
-static void w83793_noop(device_t dummy) +static void w83793_noop(struct device * dummy) { }
@@ -231,7 +231,7 @@ static struct device_operations w83793_operations = { .init = w83793_init, };
-static void enable_dev(device_t dev) +static void enable_dev(struct device *dev) { dev->ops = &w83793_operations; } diff --git a/src/drivers/i2c/w83795/w83795.c b/src/drivers/i2c/w83795/w83795.c index 87aa7f5..b8a056e 100644 --- a/src/drivers/i2c/w83795/w83795.c +++ b/src/drivers/i2c/w83795/w83795.c @@ -221,7 +221,7 @@ static void w83795_init(w83795_fan_mode_t mode, u8 dts_src) } }
-static void w83795_hwm_init(device_t dev) +static void w83795_hwm_init(struct device *dev) { struct device *cpu; struct cpu_info *info; @@ -239,7 +239,7 @@ static void w83795_hwm_init(device_t dev) printk(BIOS_ERR, "Neither AMD nor INTEL CPU detected\n"); }
-static void w83795_noop(device_t dummy) +static void w83795_noop(struct device * dummy) { }
@@ -250,7 +250,7 @@ static struct device_operations w83795_operations = { .init = w83795_hwm_init, };
-static void enable_dev(device_t dev) +static void enable_dev(struct device *dev) { dev->ops = &w83795_operations; } diff --git a/src/drivers/ics/954309/ics954309.c b/src/drivers/ics/954309/ics954309.c index ef62879..9104d28 100644 --- a/src/drivers/ics/954309/ics954309.c +++ b/src/drivers/ics/954309/ics954309.c @@ -29,7 +29,7 @@ #include "chip.h" #include <string.h>
-static void ics954309_init(device_t dev) +static void ics954309_init(struct device *dev) { struct drivers_ics_954309_config *config; u8 initdata[12]; @@ -55,7 +55,7 @@ static void ics954309_init(device_t dev) smbus_block_write(dev, 0, 12, initdata); }
-static void ics954309_noop(device_t dummy) +static void ics954309_noop(struct device * dummy) { }
diff --git a/src/ec/compal/ene932/ec.c b/src/ec/compal/ene932/ec.c index 2e83b4c..4bf6727 100644 --- a/src/ec/compal/ene932/ec.c +++ b/src/ec/compal/ene932/ec.c @@ -132,7 +132,7 @@ static u8 ec_io_read(u16 addr) */
#ifndef __SMM__ -static void ene932_init(device_t dev) +static void ene932_init(struct device *dev) { if (!dev->enabled) return; @@ -143,13 +143,13 @@ static void ene932_init(device_t dev) }
-static void ene932_read_resources(device_t dev) +static void ene932_read_resources(struct device *dev) { /* This function avoids an error on serial console. */ }
-static void ene932_enable_resources(device_t dev) +static void ene932_enable_resources(struct device *dev) { /* This function avoids an error on serial console. */ } @@ -164,7 +164,7 @@ static struct pnp_info pnp_dev_info[] = { { &ops, 0, 0, { 0, 0 }, } };
-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); diff --git a/src/ec/google/chromeec/ec_lpc.c b/src/ec/google/chromeec/ec_lpc.c index 4cd30f3..5344716 100644 --- a/src/ec/google/chromeec/ec_lpc.c +++ b/src/ec/google/chromeec/ec_lpc.c @@ -137,7 +137,7 @@ int google_chromeec_command(struct chromeec_command *cec_command) #ifndef __PRE_RAM__
#ifndef __SMM__ -static void lpc_ec_init(device_t dev) +static void lpc_ec_init(struct device *dev) { if (!dev->enabled) return; @@ -146,12 +146,12 @@ static void lpc_ec_init(device_t dev) google_chromeec_init(); }
-static void lpc_ec_read_resources(device_t dev) +static void lpc_ec_read_resources(struct device *dev) { /* Nothing, but this function avoids an error on serial console. */ }
-static void lpc_ec_enable_resources(device_t dev) +static void lpc_ec_enable_resources(struct device *dev) { /* Nothing, but this function avoids an error on serial console. */ } @@ -166,7 +166,7 @@ static struct pnp_info pnp_dev_info[] = { { &ops, 0, 0, { 0, 0 }, } };
-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); diff --git a/src/ec/kontron/it8516e/ec.c b/src/ec/kontron/it8516e/ec.c index 925b7ea..7827a1d 100644 --- a/src/ec/kontron/it8516e/ec.c +++ b/src/ec/kontron/it8516e/ec.c @@ -211,7 +211,7 @@ static void it8516e_set_fan_from_options(const config_t *const config, } }
-static void it8516e_pm2_init(const device_t dev) +static void it8516e_pm2_init(struct device *dev) { const config_t *const config = dev->chip_info;
@@ -251,7 +251,7 @@ static struct pnp_info it8516e_dev_infos[] = { { NULL, IT8516E_LDN_PM3, PNP_IO0 | PNP_IO1 | PNP_IRQ0, { 0x07ff, }, { 0x07ff, }, }, };
-static void it8516e_enable(const device_t dev) +static void it8516e_enable(struct device *dev) { pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(it8516e_dev_infos), it8516e_dev_infos); diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c index 79ef3cd..13b0483 100644 --- a/src/ec/lenovo/h8/h8.c +++ b/src/ec/lenovo/h8/h8.c @@ -167,7 +167,7 @@ u8 h8_build_id_and_function_spec_version(char *buf, u8 buf_len) return i; }
-static void h8_smbios_strings(device_t dev, struct smbios_type11 *t) +static void h8_smbios_strings(struct device *dev, struct smbios_type11 *t) { char tpec[] = "IBM ThinkPad Embedded Controller -[ ]-";
@@ -180,7 +180,7 @@ struct device_operations h8_dev_ops = { .get_smbios_strings = h8_smbios_strings };
-static void h8_enable(device_t dev) +static void h8_enable(struct device *dev) { struct ec_lenovo_h8_config *conf = dev->chip_info; u8 val, tmp; diff --git a/src/ec/lenovo/pmh7/pmh7.c b/src/ec/lenovo/pmh7/pmh7.c index cb0e27b..f67fbda 100644 --- a/src/ec/lenovo/pmh7/pmh7.c +++ b/src/ec/lenovo/pmh7/pmh7.c @@ -102,7 +102,7 @@ void pmh7_register_write(int reg, int val)
#ifndef __PRE_RAM__ #ifndef __SMM__ -static void enable_dev(device_t dev) +static void enable_dev(struct device *dev) { struct ec_lenovo_pmh7_config *conf = dev->chip_info; struct resource *resource; diff --git a/src/ec/quanta/ene_kb3940q/ec.c b/src/ec/quanta/ene_kb3940q/ec.c index f0a2308..dcd9c4a 100644 --- a/src/ec/quanta/ene_kb3940q/ec.c +++ b/src/ec/quanta/ene_kb3940q/ec.c @@ -141,7 +141,7 @@ static void ene_kb3940q_log_events(void) #endif }
-static void ene_kb3940q_init(device_t dev) +static void ene_kb3940q_init(struct device *dev) { if (!dev->enabled) return; @@ -153,13 +153,13 @@ static void ene_kb3940q_init(device_t dev) }
-static void ene_kb3940q_read_resources(device_t dev) +static void ene_kb3940q_read_resources(struct device *dev) { /* This function avoids an error on serial console. */ }
-static void ene_kb3940q_enable_resources(device_t dev) +static void ene_kb3940q_enable_resources(struct device *dev) { /* This function avoids an error on serial console. */ } @@ -174,7 +174,7 @@ static struct pnp_info pnp_dev_info[] = { { &ops, 0, 0, { 0, 0 }, } };
-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); diff --git a/src/ec/quanta/it8518/ec.c b/src/ec/quanta/it8518/ec.c index b9cb68f..cd976e6 100644 --- a/src/ec/quanta/it8518/ec.c +++ b/src/ec/quanta/it8518/ec.c @@ -156,7 +156,7 @@ void ec_it8518_enable_wake_events(void) }
#ifndef __SMM__ -static void it8518_init(device_t dev) +static void it8518_init(struct device *dev) { if (!dev->enabled) return; @@ -166,13 +166,13 @@ static void it8518_init(device_t dev) }
-static void it8518_read_resources(device_t dev) +static void it8518_read_resources(struct device *dev) { /* This function avoids an error on serial console. */ }
-static void it8518_enable_resources(device_t dev) +static void it8518_enable_resources(struct device *dev) { /* This function avoids an error on serial console. */ } @@ -187,7 +187,7 @@ static struct pnp_info pnp_dev_info[] = { { &ops, 0, 0, { 0, 0 }, } };
-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); diff --git a/src/ec/smsc/mec1308/ec.c b/src/ec/smsc/mec1308/ec.c index 4d3b30a..0a7c4ae 100644 --- a/src/ec/smsc/mec1308/ec.c +++ b/src/ec/smsc/mec1308/ec.c @@ -121,7 +121,7 @@ void ec_set_ports(u16 cmd_reg, u16 data_reg) }
#if !defined(__PRE_RAM__) && !defined(__SMM__) -static void mec1308_enable(device_t dev) +static void mec1308_enable(struct device *dev) { struct ec_smsc_mec1308_config *conf = dev->chip_info;