]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
treewide: add const to struct of_device_id 19911/head
authorRosen Penev <rosenp@gmail.com>
Thu, 28 Aug 2025 00:34:01 +0000 (17:34 -0700)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 31 Aug 2025 17:21:36 +0000 (19:21 +0200)
Most drivers have this as const. Especially upstream in the kernel.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19911
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
target/linux/generic/hack-6.12/800-GPIO-add-named-gpio-exports.patch
target/linux/generic/hack-6.6/800-GPIO-add-named-gpio-exports.patch
target/linux/lantiq/patches-6.12/035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
target/linux/qualcommax/patches-6.12/0900-power-Add-Qualcomm-APM.patch
target/linux/qualcommax/patches-6.12/0901-regulator-add-Qualcomm-CPR-regulators.patch

index ad2e0ca863144aa7b95aeff9d8d791cf0d26f9eb..75f358a208e9d1a5089b3b5eb703a20b3935dcfa 100644 (file)
@@ -416,13 +416,13 @@ gpio_keys_get_devtree_pdata(struct device *dev)
        return pdata;
 }
 
-static struct of_device_id gpio_keys_of_match[] = {
+static const struct of_device_id gpio_keys_of_match[] = {
        { .compatible = "gpio-keys", },
        { },
 };
 MODULE_DEVICE_TABLE(of, gpio_keys_of_match);
 
-static struct of_device_id gpio_keys_polled_of_match[] = {
+static const struct of_device_id gpio_keys_polled_of_match[] = {
        { .compatible = "gpio-keys-polled", },
        { },
 };
index bf75cedafdf518396f95406d25ca6997d61f0dba..f9b540f0d607fae49d11a44b4882745c606efe27 100644 (file)
@@ -22,7 +22,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +
 +#ifdef CONFIG_GPIO_SYSFS
 +
-+static struct of_device_id gpio_export_ids[] = {
++static const struct of_device_id gpio_export_ids[] = {
 +      { .compatible = "gpio-export" },
 +      { /* sentinel */ }
 +};
index 9c3696e76a6f85f2cad5fe2252d2597c6803555e..25fee9e060c64c77d6373e5d38f87d8cdd481543 100644 (file)
@@ -22,7 +22,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +
 +#ifdef CONFIG_GPIO_SYSFS
 +
-+static struct of_device_id gpio_export_ids[] = {
++static const struct of_device_id gpio_export_ids[] = {
 +      { .compatible = "gpio-export" },
 +      { /* sentinel */ }
 +};
index 1044b6da28cfaf667a0cba03ba6a7a64e8133ebd..5edb1d01ddb4b8b2cdcdfbb0b56f28527fccf06d 100644 (file)
@@ -141,7 +141,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +      return 0;
 +}
 +
-+static struct of_device_id ath5k_eeprom_ids[] = {
++static const struct of_device_id ath5k_eeprom_ids[] = {
 +      { .compatible = "ath5k,eeprom" },
 +      { }
 +};
index a83408ba43cb50651dfc5b3cfab4d9d71ab4f692..31443c566e01ada281250770daa94935aa05171d 100644 (file)
@@ -873,7 +873,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
 +
 +#endif
 +
-+static struct of_device_id msm_apm_match_table[] = {
++static const struct of_device_id msm_apm_match_table[] = {
 +      {
 +              .compatible = "qcom,msm-apm",
 +              .data = (void *)(uintptr_t)MSM8996_ID,
index 8da64d2a89d135e4c4fb73992d07893cb258ce53..64a4e9df0eee29b4acb10d3ffa450279275b5a21 100644 (file)
@@ -631,7 +631,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
 +      .cpr_clk_rate = IPQ9574_NPU_CPR_CLOCK_RATE,
 +};
 +
-+static struct of_device_id cpr3_regulator_match_table[] = {
++static const struct of_device_id cpr3_regulator_match_table[] = {
 +      {
 +              .compatible = "qcom,cpr3-ipq807x-npu-regulator",
 +              .data = &ipq807x_cpr_npu
@@ -11538,7 +11538,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
 +      .mem_acc_funcs = NULL,
 +};
 +
-+static struct of_device_id cpr4_regulator_match_table[] = {
++static const struct of_device_id cpr4_regulator_match_table[] = {
 +      {
 +              .compatible = "qcom,cpr4-ipq807x-apss-regulator",
 +              .data = &ipq807x_cpr_apss