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

@ -941,7 +941,7 @@ struct acpi_dp *acpi_dp_add_gpio(struct acpi_dp *dp, const char *name,
* } * }
* } * }
*/ */
void acpi_device_write_pci_dev(struct device *dev) void acpi_device_write_pci_dev(const struct device *dev)
{ {
const char *scope = acpi_device_scope(dev); const char *scope = acpi_device_scope(dev);
const char *name = acpi_device_name(dev); const char *name = acpi_device_name(dev);

View file

@ -930,7 +930,7 @@ unsigned long acpi_write_hpet(const struct device *device, unsigned long start,
acpi_rsdp_t *rsdp); acpi_rsdp_t *rsdp);
/* cpu/intel/speedstep/acpi.c */ /* cpu/intel/speedstep/acpi.c */
void generate_cpu_entries(struct device *device); void generate_cpu_entries(const struct device *device);
void acpi_create_mcfg(acpi_mcfg_t *mcfg); void acpi_create_mcfg(acpi_mcfg_t *mcfg);

View file

@ -508,6 +508,6 @@ void acpi_dp_write(struct acpi_dp *table);
* scope in DSDT. So, if there are any references to this PCI device scope required from static * scope in DSDT. So, if there are any references to this PCI device scope required from static
* asl files, do not use this function and instead add the device to DSDT as well. * asl files, do not use this function and instead add the device to DSDT as well.
*/ */
void acpi_device_write_pci_dev(struct device *dev); void acpi_device_write_pci_dev(const struct device *dev);
#endif #endif

View file

@ -289,7 +289,7 @@ static void generate_P_state_entries(int core, int cores_per_package)
acpigen_pop_len(); acpigen_pop_len();
} }
void generate_cpu_entries(struct device *device) void generate_cpu_entries(const struct device *device)
{ {
int coreID, cpuID, pcontrol_blk = get_pmbase(), plen = 6; int coreID, cpuID, pcontrol_blk = get_pmbase(), plen = 6;
int totalcores = dev_count_cpu(); int totalcores = dev_count_cpu();

View file

@ -281,7 +281,7 @@ static void generate_P_state_entries(int core, int cores_per_package)
acpigen_pop_len(); acpigen_pop_len();
} }
void generate_cpu_entries(struct device *device) void generate_cpu_entries(const struct device *device)
{ {
int coreID, cpuID, pcontrol_blk = PMB0_BASE, plen = 6; int coreID, cpuID, pcontrol_blk = PMB0_BASE, plen = 6;
int totalcores = dev_count_cpu(); int totalcores = dev_count_cpu();

View file

@ -284,7 +284,7 @@ static void generate_P_state_entries(int core, int cores_per_package)
acpigen_pop_len(); acpigen_pop_len();
} }
void generate_cpu_entries(struct device *device) void generate_cpu_entries(const struct device *device)
{ {
int coreID, cpuID, pcontrol_blk = PMB0_BASE, plen = 6; int coreID, cpuID, pcontrol_blk = PMB0_BASE, plen = 6;
int totalcores = dev_count_cpu(); int totalcores = dev_count_cpu();

View file

@ -81,7 +81,7 @@ static void gen_pstate_entries(const sst_table_t *const pstates,
/** /**
* @brief Generate ACPI entries for Speedstep for each cpu * @brief Generate ACPI entries for Speedstep for each cpu
*/ */
void generate_cpu_entries(struct device *device) void generate_cpu_entries(const struct device *device)
{ {
int coreID, cpuID, pcontrol_blk = PMB0_BASE, plen = 6; int coreID, cpuID, pcontrol_blk = PMB0_BASE, plen = 6;
int totalcores = determine_total_number_of_cores(); int totalcores = determine_total_number_of_cores();

View file

@ -261,7 +261,7 @@ pci_rom_write_acpi_tables(const struct device *device, unsigned long current,
return current; return current;
} }
void pci_rom_ssdt(struct device *device) void pci_rom_ssdt(const struct device *device)
{ {
static size_t ngfx; static size_t ngfx;

View file

@ -93,7 +93,7 @@ int tis_sendrecv(const uint8_t *sendbuf, size_t sbuf_size, uint8_t *recvbuf, siz
return 0; 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); const char *path = acpi_device_path(dev);
if (!path) { if (!path) {

View file

@ -14,7 +14,7 @@
#define ADAU7002_ACPI_NAME "ADAU" #define ADAU7002_ACPI_NAME "ADAU"
#define ADAU7002_ACPI_HID "ADAU7002" #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 drivers_generic_adau7002_config *config;
struct acpi_dp *dp; struct acpi_dp *dp;

View file

@ -10,7 +10,7 @@
#include <string.h> #include <string.h>
#include "chip.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 acpi_dp *dsd;
struct drivers_generic_generic_config *config = dev->chip_info; struct drivers_generic_generic_config *config = dev->chip_info;

View file

@ -46,7 +46,7 @@ static struct acpi_dp *gpio_keys_add_child_node(
return dsd; 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; struct drivers_generic_gpio_keys_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev); const char *scope = acpi_device_scope(dev);

View file

@ -9,7 +9,7 @@
#include "chip.h" #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; struct drivers_generic_gpio_regulator_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev); const char *scope = acpi_device_scope(dev);

View file

@ -14,7 +14,7 @@
#define MAX98357A_ACPI_NAME "MAXM" #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; struct drivers_generic_max98357a_config *config = dev->chip_info;
const char *path; const char *path;

View file

@ -101,7 +101,7 @@ static void gfx_fill_privacy_screen_dsm(
privacy); privacy);
} }
static void gfx_fill_ssdt_generator(struct device *dev) static void gfx_fill_ssdt_generator(const struct device *dev)
{ {
size_t i; size_t i;
struct drivers_gfx_generic_config *config = dev->chip_info; struct drivers_gfx_generic_config *config = dev->chip_info;

View file

@ -17,7 +17,7 @@
#define DA7219_ACPI_NAME "DLG7" #define DA7219_ACPI_NAME "DLG7"
#define DA7219_ACPI_HID "DLGS7219" #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; struct drivers_i2c_da7219_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev); 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, * Generate I2C timing information into the SSDT for the OS driver to consume,
* optionally applying override values provided by the caller. * 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; const struct dw_i2c_bus_config *bcfg;
uintptr_t dw_i2c_addr; 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 * Common device_operations implementation to fill ACPI SSDT table for i2c
* host controller. * 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. * 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 * callback: Callback to fill in device-specific information
* config: Pointer to drivers_i2c_generic_config structure * 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), void (*callback)(const struct device *dev),
struct drivers_i2c_generic_config *config); 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; 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), void (*callback)(const struct device *dev),
struct drivers_i2c_generic_config *config) 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)); 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); 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); 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; struct drivers_i2c_hid_config *config = dev->chip_info;
config->generic.cid = I2C_HID_CID; config->generic.cid = I2C_HID_CID;

View file

@ -14,7 +14,7 @@
#define MAX98373_ACPI_NAME "MAXI" #define MAX98373_ACPI_NAME "MAXI"
#define MAX98373_ACPI_HID "MX98373" #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; struct drivers_i2c_max98373_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev); const char *scope = acpi_device_scope(dev);

View file

@ -14,7 +14,7 @@
#define MAX98927_ACPI_NAME "MAXI" #define MAX98927_ACPI_NAME "MAXI"
#define MAX98927_ACPI_HID "MX98927" #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; struct drivers_i2c_max98927_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev); const char *scope = acpi_device_scope(dev);

View file

@ -19,7 +19,7 @@
#define NAU8825_DP_INT(key,val) \ #define NAU8825_DP_INT(key,val) \
acpi_dp_add_integer(dp, "nuvoton," 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; struct drivers_i2c_nau8825_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev); 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)) #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; struct drivers_i2c_rt1011_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev); const char *scope = acpi_device_scope(dev);

View file

@ -17,7 +17,7 @@
#define RT5663_DP_INT(key, val) \ #define RT5663_DP_INT(key, val) \
acpi_dp_add_integer(dp, "realtek," 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; struct drivers_i2c_rt5663_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev); const char *scope = acpi_device_scope(dev);

View file

@ -18,7 +18,7 @@
I2C_SX9310_ACPI_ID "," #NAME, \ I2C_SX9310_ACPI_ID "," #NAME, \
config->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; struct drivers_i2c_sx9310_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev); const char *scope = acpi_device_scope(dev);

View file

@ -11,7 +11,7 @@
#include "tpm.h" #include "tpm.h"
#include "chip.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; struct drivers_i2c_tpm_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev); const char *scope = acpi_device_scope(dev);

View file

@ -8,7 +8,7 @@
#include <device/pci_ids.h> #include <device/pci_ids.h>
#include "chip.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 drivers_intel_ish_config *config = dev->chip_info;
struct device *root = dev->bus->dev; struct device *root = dev->bus->dev;

View file

@ -10,7 +10,7 @@
#include <device/path.h> #include <device/path.h>
#include "chip.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; struct drivers_intel_mipi_camera_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev); const char *scope = acpi_device_scope(dev);

View file

@ -59,7 +59,7 @@ static int smbios_write_wifi(struct device *dev, int *handle,
#endif #endif
#if CONFIG(HAVE_ACPI_TABLES) #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 drivers_intel_wifi_config *config = dev->chip_info;
struct generic_wifi_config generic_config; struct generic_wifi_config generic_config;

View file

@ -221,7 +221,7 @@ ipmi_write_acpi_tables(const struct device *dev, unsigned long current,
return 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); const char *scope = acpi_device_scope(dev);
struct drivers_ipmi_config *conf = NULL; struct drivers_ipmi_config *conf = NULL;

View file

@ -306,7 +306,7 @@ static void r8168_init(struct device *dev)
#if CONFIG(HAVE_ACPI_TABLES) #if CONFIG(HAVE_ACPI_TABLES)
#define R8168_ACPI_HID "R8168" #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; struct drivers_net_config *config = dev->chip_info;
const char *path = acpi_device_path(dev->bus->dev); const char *path = acpi_device_path(dev->bus->dev);

View file

@ -872,7 +872,7 @@ static void (*tpm_mci_callbacks[])(void *) = {
tpm_mci_func1_cb, 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); const char *path = acpi_device_path(dev->bus->dev);
u32 arg; u32 arg;

View file

@ -59,7 +59,7 @@ static int spi_acpi_write_gpio(struct acpi_gpio *gpio, int *curr_index)
return ret; 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; struct drivers_spi_acpi_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev); const char *scope = acpi_device_scope(dev);

View file

@ -21,7 +21,7 @@ static bool usb_acpi_add_gpios_to_crs(struct drivers_usb_acpi_config *cfg)
return true; 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; struct drivers_usb_acpi_config *config = dev->chip_info;
const char *path = acpi_device_path(dev); const char *path = acpi_device_path(dev);

View file

@ -171,7 +171,7 @@ static void emit_sar_acpi_structures(void)
acpigen_pop_len(); 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 struct generic_wifi_config *config)
{ {
const char *path; const char *path;

View file

@ -22,7 +22,7 @@ struct generic_wifi_config {
* This function implements common device operation to help fill ACPI SSDT * This function implements common device operation to help fill ACPI SSDT
* table for WiFi controller. * 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); const struct generic_wifi_config *config);
/** /**

View file

@ -344,7 +344,7 @@ int google_chromeec_get_keybd_config(struct ec_response_keybd_config *keybd);
* *
* @param dev EC device * @param dev EC device
*/ */
void google_chromeec_fill_ssdt_generator(struct device *dev); void google_chromeec_fill_ssdt_generator(const struct device *dev);
/** /**
* Returns the ACPI name for the EC device. * Returns the ACPI name for the EC device.

View file

@ -187,7 +187,7 @@ static void add_usb_port_references(struct acpi_dp *dsd, int port_number)
} }
} }
static void fill_ssdt_typec_device(struct device *dev) static void fill_ssdt_typec_device(const struct device *dev)
{ {
struct usb_pd_port_caps port_caps; struct usb_pd_port_caps port_caps;
char con_name[] = "CONx"; char con_name[] = "CONx";
@ -249,7 +249,7 @@ static const enum ps2_action_key ps2_enum_val[] = {
[TK_PREV_TRACK] = PS2_KEY_PREV_TRACK, [TK_PREV_TRACK] = PS2_KEY_PREV_TRACK,
}; };
static void fill_ssdt_ps2_keyboard(struct device *dev) static void fill_ssdt_ps2_keyboard(const struct device *dev)
{ {
uint8_t i; uint8_t i;
struct ec_response_keybd_config keybd = {}; struct ec_response_keybd_config keybd = {};
@ -273,7 +273,7 @@ static void fill_ssdt_ps2_keyboard(struct device *dev)
!!(keybd.capabilities & KEYBD_CAP_SCRNLOCK_KEY)); !!(keybd.capabilities & KEYBD_CAP_SCRNLOCK_KEY));
} }
void google_chromeec_fill_ssdt_generator(struct device *dev) void google_chromeec_fill_ssdt_generator(const struct device *dev)
{ {
if (!dev->enabled) if (!dev->enabled)
return; return;

View file

@ -179,7 +179,7 @@ static void wilco_ec_read_resources(struct device *dev)
wilco_ec_resource(dev, 2, CONFIG_EC_BASE_PACKET, 16); wilco_ec_resource(dev, 2, CONFIG_EC_BASE_PACKET, 16);
} }
static void wilco_ec_fill_ssdt_generator(struct device *dev) static void wilco_ec_fill_ssdt_generator(const struct device *dev)
{ {
struct opregion opreg; struct opregion opreg;
void *region_ptr; void *region_ptr;

View file

@ -35,7 +35,7 @@ void h8_wwan_enable(int on);
bool h8_wwan_nv_enable(void); bool h8_wwan_nv_enable(void);
bool h8_has_wwan(const struct device *dev); bool h8_has_wwan(const struct device *dev);
void h8_ssdt_generator(struct device *dev); void h8_ssdt_generator(const struct device *dev);
/* EC registers */ /* EC registers */
#define H8_CONFIG0 0x00 #define H8_CONFIG0 0x00

View file

@ -8,7 +8,7 @@
#include "h8.h" #include "h8.h"
#include "chip.h" #include "chip.h"
static char *h8_dsdt_scope(struct device *dev, const char *scope) static char *h8_dsdt_scope(const struct device *dev, const char *scope)
{ {
static char buf[DEVICE_PATH_MAX] = {}; static char buf[DEVICE_PATH_MAX] = {};
const char *path = acpi_device_path(dev); const char *path = acpi_device_path(dev);
@ -22,7 +22,7 @@ static char *h8_dsdt_scope(struct device *dev, const char *scope)
/* /*
* Generates EC SSDT. * Generates EC SSDT.
*/ */
void h8_ssdt_generator(struct device *dev) void h8_ssdt_generator(const struct device *dev)
{ {
struct ec_lenovo_h8_config *conf = dev->chip_info; struct ec_lenovo_h8_config *conf = dev->chip_info;

View file

@ -50,7 +50,7 @@ struct device_operations {
#if CONFIG(HAVE_ACPI_TABLES) #if CONFIG(HAVE_ACPI_TABLES)
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)(struct device *dev); void (*acpi_fill_ssdt)(const struct device *dev);
void (*acpi_inject_dsdt)(struct device *dev); void (*acpi_inject_dsdt)(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) */

View file

@ -43,7 +43,7 @@ pci_rom_write_acpi_tables(const struct device *device,
unsigned long current, unsigned long current,
struct acpi_rsdp *rsdp); struct acpi_rsdp *rsdp);
void pci_rom_ssdt(struct device *device); void pci_rom_ssdt(const struct device *device);
void map_oprom_vendev_rev(u32 *vendev, u8 *rev); void map_oprom_vendev_rev(u32 *vendev, u8 *rev);
u32 map_oprom_vendev(u32 vendev); u32 map_oprom_vendev(u32 vendev);

View file

@ -6,7 +6,7 @@
#include <drivers/lenovo/lenovo.h> #include <drivers/lenovo/lenovo.h>
#include "dock.h" #include "dock.h"
static void fill_ssdt(struct device *device) static void fill_ssdt(const struct device *device)
{ {
drivers_lenovo_serial_ports_ssdt_generate("\\_SB.PCI0.LPCB", 0); drivers_lenovo_serial_ports_ssdt_generate("\\_SB.PCI0.LPCB", 0);
} }

View file

@ -10,7 +10,7 @@
#include <cpu/x86/lapic.h> #include <cpu/x86/lapic.h>
#include <drivers/lenovo/lenovo.h> #include <drivers/lenovo/lenovo.h>
static void fill_ssdt(struct device *device) static void fill_ssdt(const struct device *device)
{ {
drivers_lenovo_serial_ports_ssdt_generate("\\_SB.PCI0.LPCB", 0); drivers_lenovo_serial_ports_ssdt_generate("\\_SB.PCI0.LPCB", 0);
} }

View file

@ -99,7 +99,7 @@ static void mainboard_init(struct device *dev)
} }
} }
static void fill_ssdt(struct device *device) static void fill_ssdt(const struct device *device)
{ {
drivers_lenovo_serial_ports_ssdt_generate("\\_SB.PCI0.LPCB", 1); drivers_lenovo_serial_ports_ssdt_generate("\\_SB.PCI0.LPCB", 1);
} }

View file

@ -658,7 +658,7 @@ static void cpu_bus_init(struct device *dev)
/* North Bridge Structures */ /* North Bridge Structures */
static void northbridge_fill_ssdt_generator(struct device *device) static void northbridge_fill_ssdt_generator(const struct device *device)
{ {
msr_t msr; msr_t msr;
char pscope[] = "\\_SB.PCI0"; char pscope[] = "\\_SB.PCI0";

View file

@ -417,7 +417,7 @@ static unsigned long acpi_fill_hest(acpi_hest_t *hest)
return (unsigned long)current; return (unsigned long)current;
} }
static void northbridge_fill_ssdt_generator(struct device *device) static void northbridge_fill_ssdt_generator(const struct device *device)
{ {
msr_t msr; msr_t msr;
char pscope[] = "\\_SB.PCI0"; char pscope[] = "\\_SB.PCI0";

View file

@ -417,7 +417,7 @@ static unsigned long acpi_fill_hest(acpi_hest_t *hest)
return (unsigned long)current; return (unsigned long)current;
} }
static void northbridge_fill_ssdt_generator(struct device *device) static void northbridge_fill_ssdt_generator(const struct device *device)
{ {
msr_t msr; msr_t msr;
char pscope[] = "\\_SB.PCI0"; char pscope[] = "\\_SB.PCI0";

View file

@ -415,7 +415,7 @@ static unsigned long acpi_fill_hest(acpi_hest_t *hest)
return (unsigned long)current; return (unsigned long)current;
} }
static void northbridge_fill_ssdt_generator(struct device *device) static void northbridge_fill_ssdt_generator(const struct device *device)
{ {
msr_t msr; msr_t msr;
char pscope[] = "\\_SB.PCI0"; char pscope[] = "\\_SB.PCI0";

View file

@ -403,7 +403,7 @@ static unsigned long acpi_fill_hest(acpi_hest_t *hest)
return (unsigned long)current; return (unsigned long)current;
} }
static void northbridge_fill_ssdt_generator(struct device *device) static void northbridge_fill_ssdt_generator(const struct device *device)
{ {
msr_t msr; msr_t msr;
char pscope[] = "\\_SB.PCI0"; char pscope[] = "\\_SB.PCI0";

View file

@ -727,7 +727,7 @@ static unsigned long acpi_fill_ivrs(acpi_ivrs_t *ivrs, unsigned long current)
return acpi_fill_ivrs11(current, ivrs_agesa); return acpi_fill_ivrs11(current, ivrs_agesa);
} }
static void northbridge_fill_ssdt_generator(struct device *device) static void northbridge_fill_ssdt_generator(const struct device *device)
{ {
msr_t msr; msr_t msr;
char pscope[] = "\\_SB.PCI0"; char pscope[] = "\\_SB.PCI0";

View file

@ -208,7 +208,7 @@ static void gma_func0_init(struct device *dev)
intel_gma_restore_opregion(); intel_gma_restore_opregion();
} }
static void gma_generate_ssdt(struct device *device) static void gma_generate_ssdt(const struct device *device)
{ {
const struct northbridge_intel_gm45_config *chip = device->chip_info; const struct northbridge_intel_gm45_config *chip = device->chip_info;

View file

@ -513,7 +513,7 @@ static void gma_func0_init(struct device *dev)
intel_gma_restore_opregion(); intel_gma_restore_opregion();
} }
static void gma_generate_ssdt(struct device *dev) static void gma_generate_ssdt(const struct device *dev)
{ {
const struct northbridge_intel_haswell_config *chip = dev->chip_info; const struct northbridge_intel_haswell_config *chip = dev->chip_info;

View file

@ -744,7 +744,7 @@ static void gma_func1_init(struct device *dev)
pci_write_config8(dev, 0xf4, 0xff); pci_write_config8(dev, 0xf4, 0xff);
} }
static void gma_generate_ssdt(struct device *device) static void gma_generate_ssdt(const struct device *device)
{ {
const struct northbridge_intel_i945_config *chip = device->chip_info; const struct northbridge_intel_i945_config *chip = device->chip_info;

View file

@ -203,7 +203,7 @@ static void gma_read_resources(struct device *dev)
res->size = (resource_t) 0x10000000; res->size = (resource_t) 0x10000000;
} }
static void gma_generate_ssdt(struct device *device) static void gma_generate_ssdt(const struct device *device)
{ {
const struct northbridge_intel_ironlake_config *chip = device->chip_info; const struct northbridge_intel_ironlake_config *chip = device->chip_info;

View file

@ -640,7 +640,7 @@ static void gma_func0_init(struct device *dev)
intel_gma_restore_opregion(); intel_gma_restore_opregion();
} }
static void gma_generate_ssdt(struct device *device) static void gma_generate_ssdt(const struct device *device)
{ {
const struct northbridge_intel_sandybridge_config *chip = device->chip_info; const struct northbridge_intel_sandybridge_config *chip = device->chip_info;

View file

@ -80,7 +80,7 @@ static void gma_func0_disable(struct device *dev)
pci_write_config16(dev_host, D0F0_GGC, ggc); pci_write_config16(dev_host, D0F0_GGC, ggc);
} }
static void gma_generate_ssdt(struct device *device) static void gma_generate_ssdt(const struct device *device)
{ {
const struct northbridge_intel_x4x_config *chip = device->chip_info; const struct northbridge_intel_x4x_config *chip = device->chip_info;

View file

@ -220,7 +220,7 @@ void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)
header->checksum = acpi_checksum((void *)fadt, sizeof(acpi_fadt_t)); header->checksum = acpi_checksum((void *)fadt, sizeof(acpi_fadt_t));
} }
void generate_cpu_entries(struct device *device) void generate_cpu_entries(const struct device *device)
{ {
int cores, cpu; int cores, cpu;

View file

@ -159,7 +159,7 @@ unsigned long acpi_fill_mcfg(unsigned long current)
return current; return current;
} }
static void northbridge_fill_ssdt_generator(struct device *device) static void northbridge_fill_ssdt_generator(const struct device *device)
{ {
msr_t msr; msr_t msr;
char pscope[] = "\\_SB.PCI0"; char pscope[] = "\\_SB.PCI0";

View file

@ -222,7 +222,7 @@ void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)
header->checksum = acpi_checksum((void *)fadt, sizeof(acpi_fadt_t)); header->checksum = acpi_checksum((void *)fadt, sizeof(acpi_fadt_t));
} }
void generate_cpu_entries(struct device *device) void generate_cpu_entries(const struct device *device)
{ {
int cores, cpu; int cores, cpu;

View file

@ -195,7 +195,7 @@ static unsigned long acpi_fill_hest(acpi_hest_t *hest)
return (unsigned long)current; return (unsigned long)current;
} }
static void northbridge_fill_ssdt_generator(struct device *device) static void northbridge_fill_ssdt_generator(const struct device *device)
{ {
msr_t msr; msr_t msr;
char pscope[] = "\\_SB.PCI0"; char pscope[] = "\\_SB.PCI0";

View file

@ -402,7 +402,7 @@ static void generate_P_state_entries(int core, int cores_per_package)
acpigen_pop_len(); acpigen_pop_len();
} }
void generate_cpu_entries(struct device *device) void generate_cpu_entries(const struct device *device)
{ {
int core; int core;
int pcontrol_blk = get_pmbase(), plen = 6; int pcontrol_blk = get_pmbase(), plen = 6;

View file

@ -386,7 +386,7 @@ static void gfx_init(struct device *dev)
intel_gma_restore_opregion(); intel_gma_restore_opregion();
} }
static void gma_generate_ssdt(struct device *dev) static void gma_generate_ssdt(const struct device *dev)
{ {
const struct soc_intel_baytrail_config *chip = dev->chip_info; const struct soc_intel_baytrail_config *chip = dev->chip_info;

View file

@ -405,7 +405,7 @@ static void generate_p_state_entries(int core, int cores_per_package)
acpigen_pop_len(); acpigen_pop_len();
} }
void generate_cpu_entries(struct device *device) void generate_cpu_entries(const struct device *device)
{ {
int core; int core;
int pcontrol_blk = get_pmbase(), plen = 6; int pcontrol_blk = get_pmbase(), plen = 6;

View file

@ -77,7 +77,7 @@ void gma_set_gnvs_aslb(void *gnvs, uintptr_t aslb)
gnvs_ptr->aslb = aslb; gnvs_ptr->aslb = aslb;
} }
static void gma_generate_ssdt(struct device *dev) static void gma_generate_ssdt(const struct device *dev)
{ {
const struct soc_intel_braswell_config *chip = dev->chip_info; const struct soc_intel_braswell_config *chip = dev->chip_info;

View file

@ -496,7 +496,7 @@ static void generate_P_state_entries(int core, int cores_per_package)
acpigen_pop_len(); acpigen_pop_len();
} }
void generate_cpu_entries(struct device *device) void generate_cpu_entries(const struct device *device)
{ {
int coreID, cpuID, pcontrol_blk = ACPI_BASE_ADDRESS, plen = 6; int coreID, cpuID, pcontrol_blk = ACPI_BASE_ADDRESS, plen = 6;
int totalcores = dev_count_cpu(); int totalcores = dev_count_cpu();

View file

@ -616,7 +616,7 @@ gma_write_acpi_tables(const struct device *const dev, unsigned long current,
return current; return current;
} }
static void gma_generate_ssdt(struct device *dev) static void gma_generate_ssdt(const struct device *dev)
{ {
const struct soc_intel_broadwell_config *chip = dev->chip_info; const struct soc_intel_broadwell_config *chip = dev->chip_info;

View file

@ -431,7 +431,7 @@ __weak void soc_power_states_generation(int core_id,
{ {
} }
void generate_cpu_entries(struct device *device) void generate_cpu_entries(const struct device *device)
{ {
int core_id, cpu_id, pcontrol_blk = ACPI_BASE_ADDRESS; int core_id, cpu_id, pcontrol_blk = ACPI_BASE_ADDRESS;
int plen = 6; int plen = 6;

View file

@ -39,7 +39,7 @@ intel_igd_get_controller_info(const struct device *device)
return NULL; return NULL;
} }
static void gma_generate_ssdt(struct device *device) static void gma_generate_ssdt(const struct device *device)
{ {
const struct i915_gpu_controller_info *gfx = intel_igd_get_controller_info(device); const struct i915_gpu_controller_info *gfx = intel_igd_get_controller_info(device);

View file

@ -7,7 +7,7 @@
#include <intelblocks/sd.h> #include <intelblocks/sd.h>
#if CONFIG(HAVE_ACPI_TABLES) #if CONFIG(HAVE_ACPI_TABLES)
static void sd_fill_ssdt(struct device *dev) static void sd_fill_ssdt(const struct device *dev)
{ {
const char *path; const char *path;
struct acpi_gpio default_gpio = { 0 }; struct acpi_gpio default_gpio = { 0 };

View file

@ -491,7 +491,7 @@ static void generate_p_state_entries(int core, int cores_per_package)
acpigen_pop_len(); acpigen_pop_len();
} }
void generate_cpu_entries(struct device *device) void generate_cpu_entries(const struct device *device)
{ {
int core_id, cpu_id, pcontrol_blk = ACPI_BASE_ADDRESS, plen = 6; int core_id, cpu_id, pcontrol_blk = ACPI_BASE_ADDRESS, plen = 6;
int totalcores = dev_count_cpu(); int totalcores = dev_count_cpu();

View file

@ -200,7 +200,7 @@ void generate_p_state_entries(int core, int cores_per_package)
{ {
} }
void generate_cpu_entries(struct device *device) void generate_cpu_entries(const struct device *device)
{ {
int core_id, cpu_id, pcontrol_blk = ACPI_BASE_ADDRESS; int core_id, cpu_id, pcontrol_blk = ACPI_BASE_ADDRESS;
int plen = 6; int plen = 6;

View file

@ -823,7 +823,7 @@ static const char *lpc_acpi_name(const struct device *dev)
return "LPCB"; return "LPCB";
} }
static void southbridge_fill_ssdt(struct device *device) static void southbridge_fill_ssdt(const struct device *device)
{ {
struct device *dev = pcidev_on_root(0x1f, 0); struct device *dev = pcidev_on_root(0x1f, 0);
config_t *chip = dev->chip_info; config_t *chip = dev->chip_info;

View file

@ -274,7 +274,7 @@ static const char *sata_acpi_name(const struct device *dev)
return "SATA"; return "SATA";
} }
static void sata_fill_ssdt(struct device *dev) static void sata_fill_ssdt(const struct device *dev)
{ {
config_t *config = dev->chip_info; config_t *config = dev->chip_info;
generate_sata_ssdt_ports("\\_SB_.PCI0.SATA", config->sata_port_map); generate_sata_ssdt_ports("\\_SB_.PCI0.SATA", config->sata_port_map);

View file

@ -71,7 +71,7 @@ static void gen_pirq_route(const enum emit_type emit, const char *lpcb_path,
} }
} }
void intel_acpi_gen_def_acpi_pirq(struct device *dev) void intel_acpi_gen_def_acpi_pirq(const struct device *dev)
{ {
const char *lpcb_path = acpi_device_path(dev); const char *lpcb_path = acpi_device_path(dev);
char pci_int_mapping[32][4]; char pci_int_mapping[32][4];

View file

@ -24,7 +24,7 @@ enum pirq {
PIRQ_H, PIRQ_H,
}; };
void intel_acpi_gen_def_acpi_pirq(struct device *dev); void intel_acpi_gen_def_acpi_pirq(const struct device *dev);
enum pirq intel_common_map_pirq(const struct device *dev, enum pirq intel_common_map_pirq(const struct device *dev,
const enum pci_pin pci_pin); const enum pci_pin pci_pin);

View file

@ -25,7 +25,7 @@ static int determine_total_number_of_cores(void)
return count; return count;
} }
void generate_cpu_entries(struct device *device) void generate_cpu_entries(const struct device *device)
{ {
int cpu, pcontrol_blk=DEFAULT_PMBASE+PCNTRL, plen=6; int cpu, pcontrol_blk=DEFAULT_PMBASE+PCNTRL, plen=6;
int numcpus = determine_total_number_of_cores(); int numcpus = determine_total_number_of_cores();

View file

@ -118,7 +118,7 @@ static void sb_read_resources(struct device *dev)
} }
#if CONFIG(HAVE_ACPI_TABLES) #if CONFIG(HAVE_ACPI_TABLES)
static void southbridge_acpi_fill_ssdt_generator(struct device *device) static void southbridge_acpi_fill_ssdt_generator(const struct device *device)
{ {
acpigen_write_mainboard_resources("\\_SB.PCI0.MBRS", "_CRS"); acpigen_write_mainboard_resources("\\_SB.PCI0.MBRS", "_CRS");
generate_cpu_entries(device); generate_cpu_entries(device);

View file

@ -647,7 +647,7 @@ static const char *lpc_acpi_name(const struct device *dev)
return "LPCB"; return "LPCB";
} }
static void southbridge_fill_ssdt(struct device *device) static void southbridge_fill_ssdt(const struct device *device)
{ {
intel_acpi_gen_def_acpi_pirq(device); intel_acpi_gen_def_acpi_pirq(device);
} }

View file

@ -494,7 +494,7 @@ static const char *lpc_acpi_name(const struct device *dev)
return "LPCB"; return "LPCB";
} }
static void southbridge_fill_ssdt(struct device *device) static void southbridge_fill_ssdt(const struct device *device)
{ {
struct device *dev = pcidev_on_root(0x1f, 0); struct device *dev = pcidev_on_root(0x1f, 0);
config_t *chip = dev->chip_info; config_t *chip = dev->chip_info;

View file

@ -652,7 +652,7 @@ static const char *lpc_acpi_name(const struct device *dev)
return "LPCB"; return "LPCB";
} }
static void southbridge_fill_ssdt(struct device *device) static void southbridge_fill_ssdt(const struct device *device)
{ {
struct device *dev = pcidev_on_root(0x1f, 0); struct device *dev = pcidev_on_root(0x1f, 0);
config_t *chip = dev->chip_info; config_t *chip = dev->chip_info;

View file

@ -716,7 +716,7 @@ static const char *lpc_acpi_name(const struct device *dev)
return "LPCB"; return "LPCB";
} }
static void southbridge_fill_ssdt(struct device *device) static void southbridge_fill_ssdt(const struct device *device)
{ {
struct device *dev = pcidev_on_root(0x1f, 0); struct device *dev = pcidev_on_root(0x1f, 0);
config_t *chip = dev->chip_info; config_t *chip = dev->chip_info;

View file

@ -212,7 +212,7 @@ static void sata_enable(struct device *dev)
pci_write_config16(dev, 0x90, map); pci_write_config16(dev, 0x90, map);
} }
static void sata_fill_ssdt(struct device *dev) static void sata_fill_ssdt(const struct device *dev)
{ {
config_t *config = dev->chip_info; config_t *config = dev->chip_info;
generate_sata_ssdt_ports("\\_SB_.PCI0.SATA", config->sata_port_map); generate_sata_ssdt_ports("\\_SB_.PCI0.SATA", config->sata_port_map);

View file

@ -877,7 +877,7 @@ static const char *lpc_acpi_name(const struct device *dev)
return "LPCB"; return "LPCB";
} }
static void southbridge_fill_ssdt(struct device *dev) static void southbridge_fill_ssdt(const struct device *dev)
{ {
intel_acpi_gen_def_acpi_pirq(dev); intel_acpi_gen_def_acpi_pirq(dev);
} }

View file

@ -31,7 +31,7 @@ static void generic_read_resources(struct device *dev)
} }
#if CONFIG(HAVE_ACPI_TABLES) #if CONFIG(HAVE_ACPI_TABLES)
static void generic_ssdt(struct device *dev) static void generic_ssdt(const struct device *dev)
{ {
const char *scope = acpi_device_scope(dev); const char *scope = acpi_device_scope(dev);
const char *name = acpi_device_name(dev); const char *name = acpi_device_name(dev);

View file

@ -29,7 +29,7 @@ static const struct superio_dev superio_devs[] = {
static const u8 io_idx[] = {PNP_IDX_IO0, PNP_IDX_IO1, PNP_IDX_IO2, PNP_IDX_IO3}; static const u8 io_idx[] = {PNP_IDX_IO0, PNP_IDX_IO1, PNP_IDX_IO2, PNP_IDX_IO3};
static const u8 irq_idx[] = {PNP_IDX_IRQ0, PNP_IDX_IRQ1}; static const u8 irq_idx[] = {PNP_IDX_IRQ0, PNP_IDX_IRQ1};
static const struct superio_dev *superio_guess_function(struct device *dev) static const struct superio_dev *superio_guess_function(const struct device *dev)
{ {
for (size_t i = 0; i < ARRAY_SIZE(io_idx); i++) { for (size_t i = 0; i < ARRAY_SIZE(io_idx); i++) {
struct resource *res = probe_resource(dev, io_idx[i]); struct resource *res = probe_resource(dev, io_idx[i]);
@ -62,7 +62,7 @@ static const struct superio_dev *superio_guess_function(struct device *dev)
} }
/* Return true if there are resources to report */ /* Return true if there are resources to report */
static bool has_resources(struct device *dev) static bool has_resources(const struct device *dev)
{ {
for (size_t i = 0; i < ARRAY_SIZE(io_idx); i++) { for (size_t i = 0; i < ARRAY_SIZE(io_idx); i++) {
struct resource *res = probe_resource(dev, io_idx[i]); struct resource *res = probe_resource(dev, io_idx[i]);
@ -80,7 +80,7 @@ static bool has_resources(struct device *dev)
} }
/* Add IO and IRQ resources for _CRS or _PRS */ /* Add IO and IRQ resources for _CRS or _PRS */
static void ldn_gen_resources(struct device *dev) static void ldn_gen_resources(const struct device *dev)
{ {
uint16_t irq = 0; uint16_t irq = 0;
for (size_t i = 0; i < ARRAY_SIZE(io_idx); i++) { for (size_t i = 0; i < ARRAY_SIZE(io_idx); i++) {
@ -109,7 +109,7 @@ static void ldn_gen_resources(struct device *dev)
} }
/* Add resource base and size for additional SuperIO code */ /* Add resource base and size for additional SuperIO code */
static void ldn_gen_resources_use(struct device *dev) static void ldn_gen_resources_use(const struct device *dev)
{ {
char name[5]; char name[5];
for (size_t i = 0; i < ARRAY_SIZE(io_idx); i++) { for (size_t i = 0; i < ARRAY_SIZE(io_idx); i++) {
@ -161,7 +161,7 @@ static const char *name_from_hid(const char *hid)
return "Generic device"; return "Generic device";
} }
void superio_common_fill_ssdt_generator(struct device *dev) void superio_common_fill_ssdt_generator(const struct device *dev)
{ {
if (!dev || !dev->bus || !dev->bus->dev) { if (!dev || !dev->bus || !dev->bus->dev) {
printk(BIOS_CRIT, "BUG: Invalid argument in %s!\n", __func__); printk(BIOS_CRIT, "BUG: Invalid argument in %s!\n", __func__);

View file

@ -7,6 +7,6 @@
#include <device/device.h> #include <device/device.h>
const char *superio_common_ldn_acpi_name(const struct device *dev); const char *superio_common_ldn_acpi_name(const struct device *dev);
void superio_common_fill_ssdt_generator(struct device *dev); void superio_common_fill_ssdt_generator(const struct device *dev);
#endif /* __SUPERIO_COMMON_SSDT_H__ */ #endif /* __SUPERIO_COMMON_SSDT_H__ */

View file

@ -115,7 +115,7 @@ static const char *npcd378_acpi_hid(const struct device *dev)
} }
} }
static void npcd378_ssdt_aux(struct device *dev) static void npcd378_ssdt_aux(const struct device *dev)
{ {
/* Scope */ /* Scope */
acpigen_write_scope(acpi_device_path(dev)); acpigen_write_scope(acpi_device_path(dev));
@ -131,7 +131,7 @@ static void npcd378_ssdt_aux(struct device *dev)
acpigen_pop_len(); /* Pop Scope */ acpigen_pop_len(); /* Pop Scope */
} }
static void npcd378_ssdt_kbc(struct device *dev) static void npcd378_ssdt_kbc(const struct device *dev)
{ {
/* Scope */ /* Scope */
acpigen_write_scope(acpi_device_path(dev)); acpigen_write_scope(acpi_device_path(dev));
@ -147,7 +147,7 @@ static void npcd378_ssdt_kbc(struct device *dev)
acpigen_pop_len(); /* Pop Scope */ acpigen_pop_len(); /* Pop Scope */
} }
static void npcd378_ssdt_pwr(struct device *dev) static void npcd378_ssdt_pwr(const struct device *dev)
{ {
const char *name = acpi_device_path(dev); const char *name = acpi_device_path(dev);
const char *scope = acpi_device_scope(dev); const char *scope = acpi_device_scope(dev);
@ -403,7 +403,7 @@ static void npcd378_ssdt_pwr(struct device *dev)
acpigen_pop_len(); /* Scope */ acpigen_pop_len(); /* Scope */
} }
static void npcd378_fill_ssdt_generator(struct device *dev) static void npcd378_fill_ssdt_generator(const struct device *dev)
{ {
superio_common_fill_ssdt_generator(dev); superio_common_fill_ssdt_generator(dev);