mediatek: leds-smartrg-system: fix build on Linux 6.6
authorDaniel Golle <daniel@makrotopia.org>
Sat, 2 Mar 2024 04:23:22 +0000 (04:23 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 11 Mar 2024 21:22:12 +0000 (21:22 +0000)
Adapt to changed function pointer prototypes.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
target/linux/mediatek/files/drivers/leds/leds-smartrg-system.c

index 16795550687a95ee2269aab7c60d2e527c9f4dfe..77369057044f83d3c6f17439baefbe72c3e6bac5 100644 (file)
@@ -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;