From c98289b074ea9c086d9c5a66e5818b3baa788bc8 Mon Sep 17 00:00:00 2001 From: Sander Vanheule Date: Fri, 20 Feb 2026 10:37:57 +0100 Subject: [PATCH] realtek: fix regmap_field getter const qualifier The allocated regmap_field object is not stored as a const reference, so the helper function allocating the object should not return it as such. Drop 'const' so the build doesn't complain about discarding the qualifier. Fixes: 6ef6014887c3 ("realtek: Add pinctrl support for RTL8231") Signed-off-by: Sander Vanheule --- .../804-leds-Add-support-for-RTL8231-LED-scan-matrix.patch | 2 +- .../804-leds-Add-support-for-RTL8231-LED-scan-matrix.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/realtek/patches-6.12/804-leds-Add-support-for-RTL8231-LED-scan-matrix.patch b/target/linux/realtek/patches-6.12/804-leds-Add-support-for-RTL8231-LED-scan-matrix.patch index 3815ed5eda..04eb36ddf7 100644 --- a/target/linux/realtek/patches-6.12/804-leds-Add-support-for-RTL8231-LED-scan-matrix.patch +++ b/target/linux/realtek/patches-6.12/804-leds-Add-support-for-RTL8231-LED-scan-matrix.patch @@ -233,7 +233,7 @@ Signed-off-by: Sander Vanheule + return 0; +} + -+static const struct regmap_field *rtl8231_led_get_field(struct device *dev, struct regmap *map, ++static struct regmap_field *rtl8231_led_get_field(struct device *dev, struct regmap *map, + unsigned int port_index, unsigned int led_index) +{ + unsigned int offset = port_index / RTL8231_LED_PER_REG; diff --git a/target/linux/realtek/patches-6.18/804-leds-Add-support-for-RTL8231-LED-scan-matrix.patch b/target/linux/realtek/patches-6.18/804-leds-Add-support-for-RTL8231-LED-scan-matrix.patch index 27c42c2e92..fe3c935387 100644 --- a/target/linux/realtek/patches-6.18/804-leds-Add-support-for-RTL8231-LED-scan-matrix.patch +++ b/target/linux/realtek/patches-6.18/804-leds-Add-support-for-RTL8231-LED-scan-matrix.patch @@ -233,7 +233,7 @@ Signed-off-by: Sander Vanheule + return 0; +} + -+static const struct regmap_field *rtl8231_led_get_field(struct device *dev, struct regmap *map, ++static struct regmap_field *rtl8231_led_get_field(struct device *dev, struct regmap *map, + unsigned int port_index, unsigned int led_index) +{ + unsigned int offset = port_index / RTL8231_LED_PER_REG;