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:
Furquan Shaikh 2020-04-24 22:57:05 -07:00
parent 7536a398e9
commit 338fd9ad30
25 changed files with 25 additions and 25 deletions

View file

@ -51,7 +51,7 @@ struct device_operations {
unsigned long (*write_acpi_tables)(const struct device *dev, unsigned long (*write_acpi_tables)(const struct device *dev,
unsigned long start, struct acpi_rsdp *rsdp); unsigned long start, struct acpi_rsdp *rsdp);
void (*acpi_fill_ssdt)(const struct device *dev); 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); const char *(*acpi_name)(const struct device *dev);
/* Returns the optional _HID (Hardware ID) */ /* Returns the optional _HID (Hardware ID) */
const char *(*acpi_hid)(const struct device *dev); const char *(*acpi_hid)(const struct device *dev);

View file

@ -267,7 +267,7 @@ static void acpi_create_gnvs(struct global_nvs_t *gnvs)
gnvs->pcnt = dev_count_cpu(); 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; struct global_nvs_t *gnvs;

View file

@ -13,7 +13,7 @@
unsigned long southbridge_write_acpi_tables(const struct device *device, unsigned long southbridge_write_acpi_tables(const struct device *device,
unsigned long current, struct acpi_rsdp *rsdp); 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); const char *soc_acpi_name(const struct device *dev);

View file

@ -272,7 +272,7 @@ static void acpi_create_gnvs(struct global_nvs_t *gnvs)
gnvs->pcnt = dev_count_cpu(); 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; struct global_nvs_t *gnvs;

View file

@ -19,7 +19,7 @@
unsigned long southbridge_write_acpi_tables(const struct device *device, unsigned long southbridge_write_acpi_tables(const struct device *device,
unsigned long current, struct acpi_rsdp *rsdp); 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); const char *soc_acpi_name(const struct device *dev);

View file

@ -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; global_nvs_t *gnvs;

View file

@ -512,7 +512,7 @@ unsigned long southcluster_write_acpi_tables(const struct device *device, unsign
return current; return current;
} }
void southcluster_inject_dsdt(struct device *device) void southcluster_inject_dsdt(const struct device *device)
{ {
global_nvs_t *gnvs; global_nvs_t *gnvs;

View file

@ -11,7 +11,7 @@ void acpi_create_serialio_ssdt(acpi_header_t *ssdt);
void acpi_fill_in_fadt(acpi_fadt_t *fadt); void acpi_fill_in_fadt(acpi_fadt_t *fadt);
unsigned long acpi_madt_irq_overrides(unsigned long current); unsigned long acpi_madt_irq_overrides(unsigned long current);
void acpi_init_gnvs(global_nvs_t *gnvs); 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 southcluster_write_acpi_tables(const struct device *device,
unsigned long current, struct acpi_rsdp *rsdp); unsigned long current, struct acpi_rsdp *rsdp);

View file

@ -573,7 +573,7 @@ static void pch_lpc_read_resources(struct device *dev)
memset(gnvs, 0, sizeof(global_nvs_t)); 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; global_nvs_t *gnvs;

View file

@ -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; struct global_nvs_t *gnvs;

View file

@ -48,7 +48,7 @@ unsigned long southbridge_write_acpi_tables(const struct device *device,
* Creates acpi gnvs and adds it to the DSDT table. * Creates acpi gnvs and adds it to the DSDT table.
* GNVS creation is chipset specific and is done in soc specific acpi.c file. * 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. * This function populates the gnvs structure in acpi table.

View file

@ -292,7 +292,7 @@ unsigned long southcluster_write_acpi_tables(const struct device *device,
return current; return current;
} }
void southcluster_inject_dsdt(struct device *device) void southcluster_inject_dsdt(const struct device *device)
{ {
global_nvs_t *gnvs; global_nvs_t *gnvs;

View file

@ -13,7 +13,7 @@ void acpi_init_gnvs(global_nvs_t *gnvs);
unsigned long southcluster_write_acpi_tables(const struct device *device, unsigned long southcluster_write_acpi_tables(const struct device *device,
unsigned long current, unsigned long current,
struct acpi_rsdp *rsdp); 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); void motherboard_fill_fadt(acpi_fadt_t *fadt);
#endif /* _DENVERTON_NS_ACPI_H_ */ #endif /* _DENVERTON_NS_ACPI_H_ */

View file

@ -641,7 +641,7 @@ unsigned long southbridge_write_acpi_tables(const struct device *device,
return acpi_align_current(current); return acpi_align_current(current);
} }
void southbridge_inject_dsdt(struct device *device) void southbridge_inject_dsdt(const struct device *device)
{ {
global_nvs_t *gnvs; global_nvs_t *gnvs;

View file

@ -16,7 +16,7 @@
void acpi_fill_in_fadt(acpi_fadt_t *fadt); void acpi_fill_in_fadt(acpi_fadt_t *fadt);
unsigned long acpi_madt_irq_overrides(unsigned long current); unsigned long acpi_madt_irq_overrides(unsigned long current);
void acpi_mainboard_gnvs(global_nvs_t *gnvs); 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 southbridge_write_acpi_tables(const struct device *device,
unsigned long current, struct acpi_rsdp *rsdp); unsigned long current, struct acpi_rsdp *rsdp);
unsigned long northbridge_write_acpi_tables(const struct device *, unsigned long northbridge_write_acpi_tables(const struct device *,

View file

@ -34,7 +34,7 @@ unsigned long acpi_fill_mcfg(unsigned long current)
return current; return current;
} }
void southbridge_inject_dsdt(struct device *device) void southbridge_inject_dsdt(const struct device *device)
{ {
global_nvs_t *gnvs; global_nvs_t *gnvs;

View file

@ -987,7 +987,7 @@ void uncore_inject_dsdt(void)
acpigen_pop_len(); acpigen_pop_len();
} }
void southbridge_inject_dsdt(struct device *device) void southbridge_inject_dsdt(const struct device *device)
{ {
global_nvs_t *gnvs; global_nvs_t *gnvs;

View file

@ -661,7 +661,7 @@ static void pch_lpc_enable(struct device *dev)
pch_enable(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)); global_nvs_t *gnvs = cbmem_add (CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));

View file

@ -620,7 +620,7 @@ static void lpc_final(struct device *dev)
outb(POST_OS_BOOT, 0x80); 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)); global_nvs_t *gnvs = cbmem_add(CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));

View file

@ -470,7 +470,7 @@ static void i82801ix_lpc_read_resources(struct device *dev)
res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED; 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)); global_nvs_t *gnvs = cbmem_add (CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));

View file

@ -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)); global_nvs_t *gnvs = cbmem_add (CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));

View file

@ -559,7 +559,7 @@ static void pch_lpc_enable(struct device *dev)
pch_enable(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)); global_nvs_t *gnvs = cbmem_add (CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));

View file

@ -699,7 +699,7 @@ static void pch_lpc_enable(struct device *dev)
pch_enable(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; global_nvs_t *gnvs;

View file

@ -35,7 +35,7 @@ void chromeos_acpi_gpio_generate(const struct cros_gpio *gpios, size_t num)
acpigen_pop_len(); acpigen_pop_len();
} }
void chromeos_dsdt_generator(struct device *dev) void chromeos_dsdt_generator(const struct device *dev)
{ {
mainboard_chromeos_acpi_generate(); mainboard_chromeos_acpi_generate();
} }

View file

@ -70,7 +70,7 @@ void chromeos_acpi_gpio_generate(const struct cros_gpio *gpios, size_t num);
*/ */
void mainboard_chromeos_acpi_generate(void); void mainboard_chromeos_acpi_generate(void);
#if CONFIG(CHROMEOS) #if CONFIG(CHROMEOS)
void chromeos_dsdt_generator(struct device *dev); void chromeos_dsdt_generator(const struct device *dev);
#else #else
#define chromeos_dsdt_generator NULL #define chromeos_dsdt_generator NULL
#endif #endif