device: Constify struct device * parameter to acpi_fill_ssdt()

.acpi_fill_ssdt() does not need to modify the device structure. This
change makes the struct device * parameter to acpi_fill_ssdt() as
const.

Change-Id: I110f4c67c3b6671c9ac0a82e02609902a8ee5d5c
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40710
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Furquan Shaikh
2020-04-24 21:59:21 -07:00
parent ec3dafd97c
commit 7536a398e9
91 changed files with 102 additions and 102 deletions

View File

@@ -17,7 +17,7 @@
#define DA7219_ACPI_NAME "DLG7"
#define DA7219_ACPI_HID "DLGS7219"
static void da7219_fill_ssdt(struct device *dev)
static void da7219_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_da7219_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);

View File

@@ -805,7 +805,7 @@ void dw_i2c_dev_init(struct device *dev)
* Generate I2C timing information into the SSDT for the OS driver to consume,
* optionally applying override values provided by the caller.
*/
void dw_i2c_acpi_fill_ssdt(struct device *dev)
void dw_i2c_acpi_fill_ssdt(const struct device *dev)
{
const struct dw_i2c_bus_config *bcfg;
uintptr_t dw_i2c_addr;

View File

@@ -141,7 +141,7 @@ void dw_i2c_dev_init(struct device *dev);
* Common device_operations implementation to fill ACPI SSDT table for i2c
* host controller.
*/
void dw_i2c_acpi_fill_ssdt(struct device *dev);
void dw_i2c_acpi_fill_ssdt(const struct device *dev);
/*
* Common device_operations implementation for i2c host controller ops.

View File

@@ -76,7 +76,7 @@ struct drivers_i2c_generic_config {
* callback: Callback to fill in device-specific information
* config: Pointer to drivers_i2c_generic_config structure
*/
void i2c_generic_fill_ssdt(struct device *dev,
void i2c_generic_fill_ssdt(const struct device *dev,
void (*callback)(const struct device *dev),
struct drivers_i2c_generic_config *config);

View File

@@ -43,7 +43,7 @@ static int i2c_generic_write_gpio(struct acpi_gpio *gpio, int *curr_index)
return ret;
}
void i2c_generic_fill_ssdt(struct device *dev,
void i2c_generic_fill_ssdt(const struct device *dev,
void (*callback)(const struct device *dev),
struct drivers_i2c_generic_config *config)
{
@@ -159,7 +159,7 @@ void i2c_generic_fill_ssdt(struct device *dev,
config->desc ? : dev->chip_ops->name, dev_path(dev));
}
static void i2c_generic_fill_ssdt_generator(struct device *dev)
static void i2c_generic_fill_ssdt_generator(const struct device *dev)
{
i2c_generic_fill_ssdt(dev, NULL, dev->chip_info);
}

View File

@@ -20,7 +20,7 @@ static void i2c_hid_fill_dsm(const struct device *dev)
acpigen_write_dsm_i2c_hid(&dsm_config);
}
static void i2c_hid_fill_ssdt_generator(struct device *dev)
static void i2c_hid_fill_ssdt_generator(const struct device *dev)
{
struct drivers_i2c_hid_config *config = dev->chip_info;
config->generic.cid = I2C_HID_CID;

View File

@@ -14,7 +14,7 @@
#define MAX98373_ACPI_NAME "MAXI"
#define MAX98373_ACPI_HID "MX98373"
static void max98373_fill_ssdt(struct device *dev)
static void max98373_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_max98373_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);

View File

@@ -14,7 +14,7 @@
#define MAX98927_ACPI_NAME "MAXI"
#define MAX98927_ACPI_HID "MX98927"
static void max98927_fill_ssdt(struct device *dev)
static void max98927_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_max98927_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);

View File

@@ -19,7 +19,7 @@
#define NAU8825_DP_INT(key,val) \
acpi_dp_add_integer(dp, "nuvoton," key, (val))
static void nau8825_fill_ssdt(struct device *dev)
static void nau8825_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_nau8825_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);

View File

@@ -16,7 +16,7 @@
#define RT1011_DP_INT(key, val) acpi_dp_add_integer(dp, "realtek," key, (val))
static void rt1011_fill_ssdt(struct device *dev)
static void rt1011_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_rt1011_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);

View File

@@ -17,7 +17,7 @@
#define RT5663_DP_INT(key, val) \
acpi_dp_add_integer(dp, "realtek," key, (val))
static void rt5663_fill_ssdt(struct device *dev)
static void rt5663_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_rt5663_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);

View File

@@ -18,7 +18,7 @@
I2C_SX9310_ACPI_ID "," #NAME, \
config->NAME)
static void i2c_sx9310_fill_ssdt(struct device *dev)
static void i2c_sx9310_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_sx9310_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);

View File

@@ -11,7 +11,7 @@
#include "tpm.h"
#include "chip.h"
static void i2c_tpm_fill_ssdt(struct device *dev)
static void i2c_tpm_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_tpm_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);