[openwrt/openwrt] mediatek: leds-smartrg-system: fix build on Linux 6.6

LEDE Commits lede-commits at lists.infradead.org
Mon Mar 11 14:24:03 PDT 2024


dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/dcac4a28e61bee2dc2df02a87d7a70813db1995b

commit dcac4a28e61bee2dc2df02a87d7a70813db1995b
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sat Mar 2 04:23:22 2024 +0000

    mediatek: leds-smartrg-system: fix build on Linux 6.6
    
    Adapt to changed function pointer prototypes.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/mediatek/files/drivers/leds/leds-smartrg-system.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/target/linux/mediatek/files/drivers/leds/leds-smartrg-system.c b/target/linux/mediatek/files/drivers/leds/leds-smartrg-system.c
index 1679555068..7736905704 100644
--- a/target/linux/mediatek/files/drivers/leds/leds-smartrg-system.c
+++ b/target/linux/mediatek/files/drivers/leds/leds-smartrg-system.c
@@ -159,7 +159,12 @@ srg_led_init_led(struct srg_led_ctrl *sysled_ctrl, struct device_node *np)
 }
 
 static int
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,6,0)
 srg_led_probe(struct i2c_client *client, const struct i2c_device_id *id)
+#else
+srg_led_probe(struct i2c_client *client)
+#endif
 {
 	struct device_node *np = client->dev.of_node, *child;
 	struct srg_led_ctrl *sysled_ctrl;




More information about the lede-commits mailing list