summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2020-04-24 21:59:21 -0700
committerFurquan Shaikh <furquan@google.com>2020-04-28 19:50:26 +0000
commit7536a398e978aa8ddb0e5f2ae12bae73a708b68f (patch)
treeea6a86f305a7be6524b3470946f0f0726b055ade /src/drivers
parentec3dafd97ccdc4cd4b08476724f3f53a47fbdb7a (diff)
downloadcoreboot-7536a398e978aa8ddb0e5f2ae12bae73a708b68f.tar.xz
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>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/crb/tis.c2
-rw-r--r--src/drivers/generic/adau7002/adau7002.c2
-rw-r--r--src/drivers/generic/generic/generic.c2
-rw-r--r--src/drivers/generic/gpio_keys/gpio_keys.c2
-rw-r--r--src/drivers/generic/gpio_regulator/gpio_regulator.c2
-rw-r--r--src/drivers/generic/max98357a/max98357a.c2
-rw-r--r--src/drivers/gfx/generic/generic.c2
-rw-r--r--src/drivers/i2c/da7219/da7219.c2
-rw-r--r--src/drivers/i2c/designware/dw_i2c.c2
-rw-r--r--src/drivers/i2c/designware/dw_i2c.h2
-rw-r--r--src/drivers/i2c/generic/chip.h2
-rw-r--r--src/drivers/i2c/generic/generic.c4
-rw-r--r--src/drivers/i2c/hid/hid.c2
-rw-r--r--src/drivers/i2c/max98373/max98373.c2
-rw-r--r--src/drivers/i2c/max98927/max98927.c2
-rw-r--r--src/drivers/i2c/nau8825/nau8825.c2
-rw-r--r--src/drivers/i2c/rt1011/rt1011.c2
-rw-r--r--src/drivers/i2c/rt5663/rt5663.c2
-rw-r--r--src/drivers/i2c/sx9310/sx9310.c2
-rw-r--r--src/drivers/i2c/tpm/chip.c2
-rw-r--r--src/drivers/intel/ish/ish.c2
-rw-r--r--src/drivers/intel/mipi_camera/camera.c2
-rw-r--r--src/drivers/intel/wifi/wifi.c2
-rw-r--r--src/drivers/ipmi/ipmi_kcs_ops.c2
-rw-r--r--src/drivers/net/r8168.c2
-rw-r--r--src/drivers/pc80/tpm/tis.c2
-rw-r--r--src/drivers/spi/acpi/acpi.c2
-rw-r--r--src/drivers/usb/acpi/usb_acpi.c2
-rw-r--r--src/drivers/wifi/generic.c2
-rw-r--r--src/drivers/wifi/generic_wifi.h2
30 files changed, 31 insertions, 31 deletions
diff --git a/src/drivers/crb/tis.c b/src/drivers/crb/tis.c
index bd54bb6b54..0e97a07848 100644
--- a/src/drivers/crb/tis.c
+++ b/src/drivers/crb/tis.c
@@ -93,7 +93,7 @@ int tis_sendrecv(const uint8_t *sendbuf, size_t sbuf_size, uint8_t *recvbuf, siz
return 0;
}
-static void crb_tpm_fill_ssdt(struct device *dev)
+static void crb_tpm_fill_ssdt(const struct device *dev)
{
const char *path = acpi_device_path(dev);
if (!path) {
diff --git a/src/drivers/generic/adau7002/adau7002.c b/src/drivers/generic/adau7002/adau7002.c
index aa47ae6bb9..bf2f03de04 100644
--- a/src/drivers/generic/adau7002/adau7002.c
+++ b/src/drivers/generic/adau7002/adau7002.c
@@ -14,7 +14,7 @@
#define ADAU7002_ACPI_NAME "ADAU"
#define ADAU7002_ACPI_HID "ADAU7002"
-static void adau7002_fill_ssdt(struct device *dev)
+static void adau7002_fill_ssdt(const struct device *dev)
{
struct drivers_generic_adau7002_config *config;
struct acpi_dp *dp;
diff --git a/src/drivers/generic/generic/generic.c b/src/drivers/generic/generic/generic.c
index cee41a538b..eed824d375 100644
--- a/src/drivers/generic/generic/generic.c
+++ b/src/drivers/generic/generic/generic.c
@@ -10,7 +10,7 @@
#include <string.h>
#include "chip.h"
-static void generic_dev_fill_ssdt_generator(struct device *dev)
+static void generic_dev_fill_ssdt_generator(const struct device *dev)
{
struct acpi_dp *dsd;
struct drivers_generic_generic_config *config = dev->chip_info;
diff --git a/src/drivers/generic/gpio_keys/gpio_keys.c b/src/drivers/generic/gpio_keys/gpio_keys.c
index b8e72bf328..1017f7a69f 100644
--- a/src/drivers/generic/gpio_keys/gpio_keys.c
+++ b/src/drivers/generic/gpio_keys/gpio_keys.c
@@ -46,7 +46,7 @@ static struct acpi_dp *gpio_keys_add_child_node(
return dsd;
}
-static void gpio_keys_fill_ssdt_generator(struct device *dev)
+static void gpio_keys_fill_ssdt_generator(const struct device *dev)
{
struct drivers_generic_gpio_keys_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
diff --git a/src/drivers/generic/gpio_regulator/gpio_regulator.c b/src/drivers/generic/gpio_regulator/gpio_regulator.c
index 0f39910b85..0ec1626da8 100644
--- a/src/drivers/generic/gpio_regulator/gpio_regulator.c
+++ b/src/drivers/generic/gpio_regulator/gpio_regulator.c
@@ -9,7 +9,7 @@
#include "chip.h"
-static void gpio_regulator_fill_ssdt_generator(struct device *dev)
+static void gpio_regulator_fill_ssdt_generator(const struct device *dev)
{
struct drivers_generic_gpio_regulator_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
diff --git a/src/drivers/generic/max98357a/max98357a.c b/src/drivers/generic/max98357a/max98357a.c
index 599acb5afe..b9c270b0c5 100644
--- a/src/drivers/generic/max98357a/max98357a.c
+++ b/src/drivers/generic/max98357a/max98357a.c
@@ -14,7 +14,7 @@
#define MAX98357A_ACPI_NAME "MAXM"
-static void max98357a_fill_ssdt(struct device *dev)
+static void max98357a_fill_ssdt(const struct device *dev)
{
struct drivers_generic_max98357a_config *config = dev->chip_info;
const char *path;
diff --git a/src/drivers/gfx/generic/generic.c b/src/drivers/gfx/generic/generic.c
index aa8d7566f6..4670b4d65f 100644
--- a/src/drivers/gfx/generic/generic.c
+++ b/src/drivers/gfx/generic/generic.c
@@ -101,7 +101,7 @@ static void gfx_fill_privacy_screen_dsm(
privacy);
}
-static void gfx_fill_ssdt_generator(struct device *dev)
+static void gfx_fill_ssdt_generator(const struct device *dev)
{
size_t i;
struct drivers_gfx_generic_config *config = dev->chip_info;
diff --git a/src/drivers/i2c/da7219/da7219.c b/src/drivers/i2c/da7219/da7219.c
index 4cfeb9fb72..931c437546 100644
--- a/src/drivers/i2c/da7219/da7219.c
+++ b/src/drivers/i2c/da7219/da7219.c
@@ -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);
diff --git a/src/drivers/i2c/designware/dw_i2c.c b/src/drivers/i2c/designware/dw_i2c.c
index 309dfeee0a..74e24c7a53 100644
--- a/src/drivers/i2c/designware/dw_i2c.c
+++ b/src/drivers/i2c/designware/dw_i2c.c
@@ -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;
diff --git a/src/drivers/i2c/designware/dw_i2c.h b/src/drivers/i2c/designware/dw_i2c.h
index e309bc12a2..75df47592e 100644
--- a/src/drivers/i2c/designware/dw_i2c.h
+++ b/src/drivers/i2c/designware/dw_i2c.h
@@ -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.
diff --git a/src/drivers/i2c/generic/chip.h b/src/drivers/i2c/generic/chip.h
index b167b71bed..e1f4472a44 100644
--- a/src/drivers/i2c/generic/chip.h
+++ b/src/drivers/i2c/generic/chip.h
@@ -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);
diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c
index 38fcfdc160..7e709d6cc7 100644
--- a/src/drivers/i2c/generic/generic.c
+++ b/src/drivers/i2c/generic/generic.c
@@ -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);
}
diff --git a/src/drivers/i2c/hid/hid.c b/src/drivers/i2c/hid/hid.c
index 0cb28bba65..4fac85874d 100644
--- a/src/drivers/i2c/hid/hid.c
+++ b/src/drivers/i2c/hid/hid.c
@@ -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;
diff --git a/src/drivers/i2c/max98373/max98373.c b/src/drivers/i2c/max98373/max98373.c
index a7df56baa0..067563868c 100644
--- a/src/drivers/i2c/max98373/max98373.c
+++ b/src/drivers/i2c/max98373/max98373.c
@@ -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);
diff --git a/src/drivers/i2c/max98927/max98927.c b/src/drivers/i2c/max98927/max98927.c
index 0cb80ae88a..ddd9d152b0 100644
--- a/src/drivers/i2c/max98927/max98927.c
+++ b/src/drivers/i2c/max98927/max98927.c
@@ -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);
diff --git a/src/drivers/i2c/nau8825/nau8825.c b/src/drivers/i2c/nau8825/nau8825.c
index c3e95e7506..fd9cfc9679 100644
--- a/src/drivers/i2c/nau8825/nau8825.c
+++ b/src/drivers/i2c/nau8825/nau8825.c
@@ -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);
diff --git a/src/drivers/i2c/rt1011/rt1011.c b/src/drivers/i2c/rt1011/rt1011.c
index 68681ef846..ec018cc38f 100644
--- a/src/drivers/i2c/rt1011/rt1011.c
+++ b/src/drivers/i2c/rt1011/rt1011.c
@@ -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);
diff --git a/src/drivers/i2c/rt5663/rt5663.c b/src/drivers/i2c/rt5663/rt5663.c
index 70c14efc45..67d8dea562 100644
--- a/src/drivers/i2c/rt5663/rt5663.c
+++ b/src/drivers/i2c/rt5663/rt5663.c
@@ -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);
diff --git a/src/drivers/i2c/sx9310/sx9310.c b/src/drivers/i2c/sx9310/sx9310.c
index a4fac10f60..44cb883478 100644
--- a/src/drivers/i2c/sx9310/sx9310.c
+++ b/src/drivers/i2c/sx9310/sx9310.c
@@ -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);
diff --git a/src/drivers/i2c/tpm/chip.c b/src/drivers/i2c/tpm/chip.c
index b81b0d17c8..fbf9ffa667 100644
--- a/src/drivers/i2c/tpm/chip.c
+++ b/src/drivers/i2c/tpm/chip.c
@@ -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);
diff --git a/src/drivers/intel/ish/ish.c b/src/drivers/intel/ish/ish.c
index 3daf4915c6..58402869f4 100644
--- a/src/drivers/intel/ish/ish.c
+++ b/src/drivers/intel/ish/ish.c
@@ -8,7 +8,7 @@
#include <device/pci_ids.h>
#include "chip.h"
-static void ish_fill_ssdt_generator(struct device *dev)
+static void ish_fill_ssdt_generator(const struct device *dev)
{
struct drivers_intel_ish_config *config = dev->chip_info;
struct device *root = dev->bus->dev;
diff --git a/src/drivers/intel/mipi_camera/camera.c b/src/drivers/intel/mipi_camera/camera.c
index aabf2bad2d..b8e1076346 100644
--- a/src/drivers/intel/mipi_camera/camera.c
+++ b/src/drivers/intel/mipi_camera/camera.c
@@ -10,7 +10,7 @@
#include <device/path.h>
#include "chip.h"
-static void camera_fill_ssdt(struct device *dev)
+static void camera_fill_ssdt(const struct device *dev)
{
struct drivers_intel_mipi_camera_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
diff --git a/src/drivers/intel/wifi/wifi.c b/src/drivers/intel/wifi/wifi.c
index c3e551a7b9..ffbab4de79 100644
--- a/src/drivers/intel/wifi/wifi.c
+++ b/src/drivers/intel/wifi/wifi.c
@@ -59,7 +59,7 @@ static int smbios_write_wifi(struct device *dev, int *handle,
#endif
#if CONFIG(HAVE_ACPI_TABLES)
-static void intel_wifi_fill_ssdt(struct device *dev)
+static void intel_wifi_fill_ssdt(const struct device *dev)
{
struct drivers_intel_wifi_config *config = dev->chip_info;
struct generic_wifi_config generic_config;
diff --git a/src/drivers/ipmi/ipmi_kcs_ops.c b/src/drivers/ipmi/ipmi_kcs_ops.c
index 349abbce3f..145313a599 100644
--- a/src/drivers/ipmi/ipmi_kcs_ops.c
+++ b/src/drivers/ipmi/ipmi_kcs_ops.c
@@ -221,7 +221,7 @@ ipmi_write_acpi_tables(const struct device *dev, unsigned long current,
return current;
}
-static void ipmi_ssdt(struct device *dev)
+static void ipmi_ssdt(const struct device *dev)
{
const char *scope = acpi_device_scope(dev);
struct drivers_ipmi_config *conf = NULL;
diff --git a/src/drivers/net/r8168.c b/src/drivers/net/r8168.c
index c547f1776c..b904586dd5 100644
--- a/src/drivers/net/r8168.c
+++ b/src/drivers/net/r8168.c
@@ -306,7 +306,7 @@ static void r8168_init(struct device *dev)
#if CONFIG(HAVE_ACPI_TABLES)
#define R8168_ACPI_HID "R8168"
-static void r8168_net_fill_ssdt(struct device *dev)
+static void r8168_net_fill_ssdt(const struct device *dev)
{
struct drivers_net_config *config = dev->chip_info;
const char *path = acpi_device_path(dev->bus->dev);
diff --git a/src/drivers/pc80/tpm/tis.c b/src/drivers/pc80/tpm/tis.c
index 1081410011..3d4c6b6d98 100644
--- a/src/drivers/pc80/tpm/tis.c
+++ b/src/drivers/pc80/tpm/tis.c
@@ -872,7 +872,7 @@ static void (*tpm_mci_callbacks[])(void *) = {
tpm_mci_func1_cb,
};
-static void lpc_tpm_fill_ssdt(struct device *dev)
+static void lpc_tpm_fill_ssdt(const struct device *dev)
{
const char *path = acpi_device_path(dev->bus->dev);
u32 arg;
diff --git a/src/drivers/spi/acpi/acpi.c b/src/drivers/spi/acpi/acpi.c
index 76bddbdfe5..0eeaffbddd 100644
--- a/src/drivers/spi/acpi/acpi.c
+++ b/src/drivers/spi/acpi/acpi.c
@@ -59,7 +59,7 @@ static int spi_acpi_write_gpio(struct acpi_gpio *gpio, int *curr_index)
return ret;
}
-static void spi_acpi_fill_ssdt_generator(struct device *dev)
+static void spi_acpi_fill_ssdt_generator(const struct device *dev)
{
struct drivers_spi_acpi_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
diff --git a/src/drivers/usb/acpi/usb_acpi.c b/src/drivers/usb/acpi/usb_acpi.c
index a6a004f760..916d3733ec 100644
--- a/src/drivers/usb/acpi/usb_acpi.c
+++ b/src/drivers/usb/acpi/usb_acpi.c
@@ -21,7 +21,7 @@ static bool usb_acpi_add_gpios_to_crs(struct drivers_usb_acpi_config *cfg)
return true;
}
-static void usb_acpi_fill_ssdt_generator(struct device *dev)
+static void usb_acpi_fill_ssdt_generator(const struct device *dev)
{
struct drivers_usb_acpi_config *config = dev->chip_info;
const char *path = acpi_device_path(dev);
diff --git a/src/drivers/wifi/generic.c b/src/drivers/wifi/generic.c
index fe2e39d29d..b864094499 100644
--- a/src/drivers/wifi/generic.c
+++ b/src/drivers/wifi/generic.c
@@ -171,7 +171,7 @@ static void emit_sar_acpi_structures(void)
acpigen_pop_len();
}
-void generic_wifi_fill_ssdt(struct device *dev,
+void generic_wifi_fill_ssdt(const struct device *dev,
const struct generic_wifi_config *config)
{
const char *path;
diff --git a/src/drivers/wifi/generic_wifi.h b/src/drivers/wifi/generic_wifi.h
index 1c90bc6d66..b863ef4565 100644
--- a/src/drivers/wifi/generic_wifi.h
+++ b/src/drivers/wifi/generic_wifi.h
@@ -22,7 +22,7 @@ struct generic_wifi_config {
* This function implements common device operation to help fill ACPI SSDT
* table for WiFi controller.
*/
-void generic_wifi_fill_ssdt(struct device *dev,
+void generic_wifi_fill_ssdt(const struct device *dev,
const struct generic_wifi_config *config);
/**