diff options
author | Sven Wegener <sven.wegener@stealer.net> | 2024-05-10 13:52:00 +0200 |
---|---|---|
committer | Robert Marko <robimarko@gmail.com> | 2024-05-11 12:38:13 +0200 |
commit | 0162174e7e384a615eb7682b978d6489de556fa1 (patch) | |
tree | 51ff1a21b07823f1d36342ed9d4b3dfca6b7be0b /package | |
parent | 8113169cadce2e298a6a6b973132bd40a996f2f4 (diff) | |
download | openwrt-0162174e7e384a615eb7682b978d6489de556fa1.tar.gz openwrt-0162174e7e384a615eb7682b978d6489de556fa1.tar.bz2 openwrt-0162174e7e384a615eb7682b978d6489de556fa1.zip |
ubnt-ledbar: adapt for kernel v6.6
Linux kernel commit torvalds/linux@b8a1a4cd5a98a2adf8dfd6902cd98e57d910ee12
added a temporary probe_new member to struct i2c_driver, to drop the
rarely used second parameter of the probe function and not break API for
out of tree drivers. With torvalds/linux@5eb1e6e459cfa025f79c43014f66ff62a55542f1,
which is part of v6.6, this probe_new member is dropped and the
signature of the probe function is updated.
ubnt-ledbar is used by the mediatek and ramips targets and both have
been updated to v6.6, so adapt the probe function signature and remove
other compat code for versions before v6.6.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Link: https://github.com/openwrt/openwrt/pull/15443
Signed-off-by: Robert Marko <robimarko@gmail.com>
Diffstat (limited to 'package')
-rw-r--r-- | package/kernel/ubnt-ledbar/src/leds-ubnt-ledbar.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/package/kernel/ubnt-ledbar/src/leds-ubnt-ledbar.c b/package/kernel/ubnt-ledbar/src/leds-ubnt-ledbar.c index ee9d34601c..e0516322dc 100644 --- a/package/kernel/ubnt-ledbar/src/leds-ubnt-ledbar.c +++ b/package/kernel/ubnt-ledbar/src/leds-ubnt-ledbar.c @@ -9,7 +9,6 @@ #include <linux/of.h> #include <linux/of_gpio.h> #include <linux/gpio/consumer.h> -#include <linux/version.h> /** * Driver for the Ubiquiti RGB LED controller (LEDBAR). @@ -167,9 +166,7 @@ static int ubnt_ledbar_init_led(struct device_node *np, struct ubnt_ledbar *ledb return ret; } - -static int ubnt_ledbar_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int ubnt_ledbar_probe(struct i2c_client *client) { struct device_node *np = client->dev.of_node; struct ubnt_ledbar *ledbar; @@ -219,19 +216,11 @@ static int ubnt_ledbar_probe(struct i2c_client *client, return ubnt_ledbar_apply_state(ledbar); } -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0) -static int ubnt_ledbar_remove(struct i2c_client *client) -#else static void ubnt_ledbar_remove(struct i2c_client *client) -#endif { struct ubnt_ledbar *ledbar = i2c_get_clientdata(client); mutex_destroy(&ledbar->lock); - -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0) - return 0; -#endif } static const struct i2c_device_id ubnt_ledbar_id[] = { |