diff options
author | 2025-04-02 12:21:29 +0100 | |
---|---|---|
committer | 2025-04-24 12:14:33 +0200 | |
commit | bbd7a03dc9a22179726f001f63b460da71907024 (patch) | |
tree | debd53a770530f1c1e96de4ddd8538b995fc017b /drivers/hid | |
parent | HID: intel-thc-hid: intel-quicki2c: pass correct arguments to acpi_evaluate_object (diff) | |
download | linux-rng-bbd7a03dc9a22179726f001f63b460da71907024.tar.xz linux-rng-bbd7a03dc9a22179726f001f63b460da71907024.zip |
HID: intel-thc-hid: intel-thc: make read-only arrays static const
Don't populate the read-only arrays frequency and frequency_div on
the stack at run time, instead make them static const.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Even Xu <even.xu@intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c b/drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c index 4fc78b5a04b5..c105df7f6c87 100644 --- a/drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c +++ b/drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c @@ -1121,7 +1121,7 @@ EXPORT_SYMBOL_NS_GPL(thc_port_select, "INTEL_THC"); static u8 thc_get_spi_freq_div_val(struct thc_device *dev, u32 spi_freq_val) { - int frequency[] = { + static const int frequency[] = { THC_SPI_FREQUENCY_7M, THC_SPI_FREQUENCY_15M, THC_SPI_FREQUENCY_17M, @@ -1130,7 +1130,7 @@ static u8 thc_get_spi_freq_div_val(struct thc_device *dev, u32 spi_freq_val) THC_SPI_FREQUENCY_31M, THC_SPI_FREQUENCY_41M, }; - u8 frequency_div[] = { + static const u8 frequency_div[] = { THC_SPI_FRQ_DIV_2, THC_SPI_FRQ_DIV_1, THC_SPI_FRQ_DIV_7, |