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: 6ef6014887 ("realtek: Add pinctrl support for RTL8231")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
This commit is contained in:
Sander Vanheule 2026-02-20 10:37:57 +01:00
parent 75a33df5f6
commit c98289b074
2 changed files with 2 additions and 2 deletions

View File

@ -233,7 +233,7 @@ Signed-off-by: Sander Vanheule <sander@svanheule.net>
+ 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;

View File

@ -233,7 +233,7 @@ Signed-off-by: Sander Vanheule <sander@svanheule.net>
+ 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;