From: Daniel Golle Date: Fri, 3 May 2024 20:33:41 +0000 (+0100) Subject: mediatek: remove macros for previous kernel versions X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2201d55257150b5509dcb55f515450ac0e5287f8;p=openwrt%2Fopenwrt.git mediatek: remove macros for previous kernel versions Remove unnecessary 'if' macros for previous kernel versions. After removing kernel 6.1 the kernel is always >= 6.6 so the conditions are unnecessary. Signed-off-by: Daniel Golle --- 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 7736905704..5e1e3a3542 100644 --- a/target/linux/mediatek/files/drivers/leds/leds-smartrg-system.c +++ b/target/linux/mediatek/files/drivers/leds/leds-smartrg-system.c @@ -7,7 +7,6 @@ #include #include #include -#include /** * Driver for SmartRG RGBW LED microcontroller. @@ -160,11 +159,7 @@ 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; @@ -198,21 +193,13 @@ static void srg_led_disable(struct i2c_client *client) srg_led_i2c_write(sysled_ctrl, i, 0); } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,16,0) static void -#else -static int -#endif srg_led_remove(struct i2c_client *client) { struct srg_led_ctrl *sysled_ctrl = i2c_get_clientdata(client); srg_led_disable(client); mutex_destroy(&sysled_ctrl->lock); - -#if LINUX_VERSION_CODE < KERNEL_VERSION(5,16,0) - return 0; -#endif } static const struct i2c_device_id srg_led_id[] = {