Commit Graph

9 Commits

Author SHA1 Message Date
Rosen Penev 15f5c7e365 ubnt-ledbar: fix compilation error
Wrong variable name from copy/paste.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16640
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-08 22:24:54 +02:00
Rosen Penev 3483f63c56 kernel: ubnt-ledbar: use devm_mutex_init
Allows remove the _remove function as devm calls mutex_destroy
automatically.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16615
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-08 19:21:43 +02:00
Rosen Penev d3e5a4d0a1 kernel: ubnt-ledbar: return directly
Removes ret variable.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16508
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-03 16:39:38 +02:00
Rosen Penev f09d973d14 kernel: ubnt-ledbar: use dev_err_probe
Handles EPROBE_DEFER and simplifies the code.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16508
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-03 16:39:38 +02:00
Sven Wegener 0162174e7e ubnt-ledbar: adapt for kernel v6.6
Linux kernel commit torvalds/linux@b8a1a4cd5a
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@5eb1e6e459,
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>
2024-05-11 12:38:13 +02:00
Tomasz Maciej Nowak e81298463e
ubnt-ledbar: depend on mediatek and ramips subtargets
It's only used on devices in mt7621 and mt7622 subtargets, so no reason
to compile it for others.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2023-05-24 00:56:54 +02:00
Tomasz Maciej Nowak 3d63bf4da7
ubnt-ledbar: add kernel 6.1 compat
As of ed5c2f5fd10d ("i2c: Make remove callback return void") return
value of remove function is ignored.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2023-05-24 00:56:35 +02:00
Daniel Golle 7bba6b6f63 ubnt-ledbar: make package available on other targets
As also ramips/mt7621 now has a user of the ubnt-ledbar driver, make
the package available on all targets by removing the dependency on
@TARGET_mediatek_mt7622.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-30 13:29:58 +01:00
Felix Fietkau 4363faef8a kernel: move ubnt ledbar driver to a separate package
Simplifies the tree by removing a non-upstream kernel patch and related kconfig
symbols

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-09-30 11:28:51 +02:00