[openwrt/openwrt] mediatek: remove macros for previous kernel versions
LEDE Commits
lede-commits at lists.infradead.org
Fri May 3 15:02:53 PDT 2024
dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2201d55257150b5509dcb55f515450ac0e5287f8
commit 2201d55257150b5509dcb55f515450ac0e5287f8
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Fri May 3 21:33:41 2024 +0100
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 <daniel at makrotopia.org>
---
.../linux/mediatek/files/drivers/leds/leds-smartrg-system.c | 13 -------------
1 file changed, 13 deletions(-)
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 <linux/module.h>
#include <linux/mutex.h>
#include <linux/of.h>
-#include <linux/version.h>
/**
* 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[] = {
More information about the lede-commits
mailing list