device: Constify struct device * parameter to acpi_inject_dsdt
.acpi_inject_dsdt() does not need to modify the device structure. Hence, this change makes the struct device * parameter to acpi_inject_dsdt as const. Change-Id: I3b096d9a5a9d649193e32ea686d5de9f78124997 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/40711 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
7536a398e9
commit
338fd9ad30
|
@ -51,7 +51,7 @@ struct device_operations {
|
|||
unsigned long (*write_acpi_tables)(const struct device *dev,
|
||||
unsigned long start, struct acpi_rsdp *rsdp);
|
||||
void (*acpi_fill_ssdt)(const struct device *dev);
|
||||
void (*acpi_inject_dsdt)(struct device *dev);
|
||||
void (*acpi_inject_dsdt)(const struct device *dev);
|
||||
const char *(*acpi_name)(const struct device *dev);
|
||||
/* Returns the optional _HID (Hardware ID) */
|
||||
const char *(*acpi_hid)(const struct device *dev);
|
||||
|
|
|
@ -267,7 +267,7 @@ static void acpi_create_gnvs(struct global_nvs_t *gnvs)
|
|||
gnvs->pcnt = dev_count_cpu();
|
||||
}
|
||||
|
||||
void southbridge_inject_dsdt(struct device *device)
|
||||
void southbridge_inject_dsdt(const struct device *device)
|
||||
{
|
||||
struct global_nvs_t *gnvs;
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
unsigned long southbridge_write_acpi_tables(const struct device *device,
|
||||
unsigned long current, struct acpi_rsdp *rsdp);
|
||||
|
||||
void southbridge_inject_dsdt(struct device *device);
|
||||
void southbridge_inject_dsdt(const struct device *device);
|
||||
|
||||
const char *soc_acpi_name(const struct device *dev);
|
||||
|
||||
|
|
|
@ -272,7 +272,7 @@ static void acpi_create_gnvs(struct global_nvs_t *gnvs)
|
|||
gnvs->pcnt = dev_count_cpu();
|
||||
}
|
||||
|
||||
void southbridge_inject_dsdt(struct device *device)
|
||||
void southbridge_inject_dsdt(const struct device *device)
|
||||
{
|
||||
struct global_nvs_t *gnvs;
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
unsigned long southbridge_write_acpi_tables(const struct device *device,
|
||||
unsigned long current, struct acpi_rsdp *rsdp);
|
||||
|
||||
void southbridge_inject_dsdt(struct device *device);
|
||||
void southbridge_inject_dsdt(const struct device *device);
|
||||
|
||||
const char *soc_acpi_name(const struct device *dev);
|
||||
|
||||
|
|
|
@ -483,7 +483,7 @@ void southcluster_enable_dev(struct device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
static void southcluster_inject_dsdt(struct device *device)
|
||||
static void southcluster_inject_dsdt(const struct device *device)
|
||||
{
|
||||
global_nvs_t *gnvs;
|
||||
|
||||
|
|
|
@ -512,7 +512,7 @@ unsigned long southcluster_write_acpi_tables(const struct device *device, unsign
|
|||
return current;
|
||||
}
|
||||
|
||||
void southcluster_inject_dsdt(struct device *device)
|
||||
void southcluster_inject_dsdt(const struct device *device)
|
||||
{
|
||||
global_nvs_t *gnvs;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ void acpi_create_serialio_ssdt(acpi_header_t *ssdt);
|
|||
void acpi_fill_in_fadt(acpi_fadt_t *fadt);
|
||||
unsigned long acpi_madt_irq_overrides(unsigned long current);
|
||||
void acpi_init_gnvs(global_nvs_t *gnvs);
|
||||
void southcluster_inject_dsdt(struct device *device);
|
||||
void southcluster_inject_dsdt(const struct device *device);
|
||||
unsigned long southcluster_write_acpi_tables(const struct device *device,
|
||||
unsigned long current, struct acpi_rsdp *rsdp);
|
||||
|
||||
|
|
|
@ -573,7 +573,7 @@ static void pch_lpc_read_resources(struct device *dev)
|
|||
memset(gnvs, 0, sizeof(global_nvs_t));
|
||||
}
|
||||
|
||||
static void southcluster_inject_dsdt(struct device *device)
|
||||
static void southcluster_inject_dsdt(const struct device *device)
|
||||
{
|
||||
global_nvs_t *gnvs;
|
||||
|
||||
|
|
|
@ -243,7 +243,7 @@ __weak void acpi_create_gnvs(struct global_nvs_t *gnvs)
|
|||
{
|
||||
}
|
||||
|
||||
void southbridge_inject_dsdt(struct device *device)
|
||||
void southbridge_inject_dsdt(const struct device *device)
|
||||
{
|
||||
struct global_nvs_t *gnvs;
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ unsigned long southbridge_write_acpi_tables(const struct device *device,
|
|||
* Creates acpi gnvs and adds it to the DSDT table.
|
||||
* GNVS creation is chipset specific and is done in soc specific acpi.c file.
|
||||
*/
|
||||
void southbridge_inject_dsdt(struct device *device);
|
||||
void southbridge_inject_dsdt(const struct device *device);
|
||||
|
||||
/*
|
||||
* This function populates the gnvs structure in acpi table.
|
||||
|
|
|
@ -292,7 +292,7 @@ unsigned long southcluster_write_acpi_tables(const struct device *device,
|
|||
return current;
|
||||
}
|
||||
|
||||
void southcluster_inject_dsdt(struct device *device)
|
||||
void southcluster_inject_dsdt(const struct device *device)
|
||||
{
|
||||
global_nvs_t *gnvs;
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ void acpi_init_gnvs(global_nvs_t *gnvs);
|
|||
unsigned long southcluster_write_acpi_tables(const struct device *device,
|
||||
unsigned long current,
|
||||
struct acpi_rsdp *rsdp);
|
||||
void southcluster_inject_dsdt(struct device *device);
|
||||
void southcluster_inject_dsdt(const struct device *device);
|
||||
void motherboard_fill_fadt(acpi_fadt_t *fadt);
|
||||
|
||||
#endif /* _DENVERTON_NS_ACPI_H_ */
|
||||
|
|
|
@ -641,7 +641,7 @@ unsigned long southbridge_write_acpi_tables(const struct device *device,
|
|||
return acpi_align_current(current);
|
||||
}
|
||||
|
||||
void southbridge_inject_dsdt(struct device *device)
|
||||
void southbridge_inject_dsdt(const struct device *device)
|
||||
{
|
||||
global_nvs_t *gnvs;
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
void acpi_fill_in_fadt(acpi_fadt_t *fadt);
|
||||
unsigned long acpi_madt_irq_overrides(unsigned long current);
|
||||
void acpi_mainboard_gnvs(global_nvs_t *gnvs);
|
||||
void southbridge_inject_dsdt(struct device *device);
|
||||
void southbridge_inject_dsdt(const struct device *device);
|
||||
unsigned long southbridge_write_acpi_tables(const struct device *device,
|
||||
unsigned long current, struct acpi_rsdp *rsdp);
|
||||
unsigned long northbridge_write_acpi_tables(const struct device *,
|
||||
|
|
|
@ -34,7 +34,7 @@ unsigned long acpi_fill_mcfg(unsigned long current)
|
|||
return current;
|
||||
}
|
||||
|
||||
void southbridge_inject_dsdt(struct device *device)
|
||||
void southbridge_inject_dsdt(const struct device *device)
|
||||
{
|
||||
global_nvs_t *gnvs;
|
||||
|
||||
|
|
|
@ -987,7 +987,7 @@ void uncore_inject_dsdt(void)
|
|||
acpigen_pop_len();
|
||||
}
|
||||
|
||||
void southbridge_inject_dsdt(struct device *device)
|
||||
void southbridge_inject_dsdt(const struct device *device)
|
||||
{
|
||||
global_nvs_t *gnvs;
|
||||
|
||||
|
|
|
@ -661,7 +661,7 @@ static void pch_lpc_enable(struct device *dev)
|
|||
pch_enable(dev);
|
||||
}
|
||||
|
||||
static void southbridge_inject_dsdt(struct device *dev)
|
||||
static void southbridge_inject_dsdt(const struct device *dev)
|
||||
{
|
||||
global_nvs_t *gnvs = cbmem_add (CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));
|
||||
|
||||
|
|
|
@ -620,7 +620,7 @@ static void lpc_final(struct device *dev)
|
|||
outb(POST_OS_BOOT, 0x80);
|
||||
}
|
||||
|
||||
static void southbridge_inject_dsdt(struct device *dev)
|
||||
static void southbridge_inject_dsdt(const struct device *dev)
|
||||
{
|
||||
global_nvs_t *gnvs = cbmem_add(CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));
|
||||
|
||||
|
|
|
@ -470,7 +470,7 @@ static void i82801ix_lpc_read_resources(struct device *dev)
|
|||
res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED;
|
||||
}
|
||||
|
||||
static void southbridge_inject_dsdt(struct device *dev)
|
||||
static void southbridge_inject_dsdt(const struct device *dev)
|
||||
{
|
||||
global_nvs_t *gnvs = cbmem_add (CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));
|
||||
|
||||
|
|
|
@ -629,7 +629,7 @@ static void i82801jx_lpc_read_resources(struct device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
static void southbridge_inject_dsdt(struct device *dev)
|
||||
static void southbridge_inject_dsdt(const struct device *dev)
|
||||
{
|
||||
global_nvs_t *gnvs = cbmem_add (CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));
|
||||
|
||||
|
|
|
@ -559,7 +559,7 @@ static void pch_lpc_enable(struct device *dev)
|
|||
pch_enable(dev);
|
||||
}
|
||||
|
||||
static void southbridge_inject_dsdt(struct device *dev)
|
||||
static void southbridge_inject_dsdt(const struct device *dev)
|
||||
{
|
||||
global_nvs_t *gnvs = cbmem_add (CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));
|
||||
|
||||
|
|
|
@ -699,7 +699,7 @@ static void pch_lpc_enable(struct device *dev)
|
|||
pch_enable(dev);
|
||||
}
|
||||
|
||||
static void southbridge_inject_dsdt(struct device *dev)
|
||||
static void southbridge_inject_dsdt(const struct device *dev)
|
||||
{
|
||||
global_nvs_t *gnvs;
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ void chromeos_acpi_gpio_generate(const struct cros_gpio *gpios, size_t num)
|
|||
acpigen_pop_len();
|
||||
}
|
||||
|
||||
void chromeos_dsdt_generator(struct device *dev)
|
||||
void chromeos_dsdt_generator(const struct device *dev)
|
||||
{
|
||||
mainboard_chromeos_acpi_generate();
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ void chromeos_acpi_gpio_generate(const struct cros_gpio *gpios, size_t num);
|
|||
*/
|
||||
void mainboard_chromeos_acpi_generate(void);
|
||||
#if CONFIG(CHROMEOS)
|
||||
void chromeos_dsdt_generator(struct device *dev);
|
||||
void chromeos_dsdt_generator(const struct device *dev);
|
||||
#else
|
||||
#define chromeos_dsdt_generator NULL
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue