mirror of
https://github.com/openwrt/openwrt.git
synced 2025-03-04 21:15:29 +00:00
lantiq: use devm for mutex_init
It's common to avoid calling mutex_destroy when done. It's not correct strictly speaking. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://github.com/openwrt/openwrt/pull/16832 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit fccff963c0a6ba035455daea61566f4d121643e3) Link: https://github.com/openwrt/openwrt/pull/17097 Signed-off-by: Petr Štetiar <ynezz@true.cz>
This commit is contained in:
parent
62690e3b51
commit
67da3d33f3
@ -186,7 +186,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
|||||||
obj-y += vmmc.o
|
obj-y += vmmc.o
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/arch/mips/lantiq/xway/timer.c
|
+++ b/arch/mips/lantiq/xway/timer.c
|
||||||
@@ -0,0 +1,886 @@
|
@@ -0,0 +1,888 @@
|
||||||
+#ifndef CONFIG_SOC_AMAZON_SE
|
+#ifndef CONFIG_SOC_AMAZON_SE
|
||||||
+
|
+
|
||||||
+#include <linux/kernel.h>
|
+#include <linux/kernel.h>
|
||||||
@ -989,7 +989,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
|||||||
+ ltq_w32(0xfff, LQ_GPTU_IRNCR);
|
+ ltq_w32(0xfff, LQ_GPTU_IRNCR);
|
||||||
+
|
+
|
||||||
+ memset(&timer_dev, 0, sizeof(timer_dev));
|
+ memset(&timer_dev, 0, sizeof(timer_dev));
|
||||||
+ mutex_init(&timer_dev.gptu_mutex);
|
+ ret = devm_mutex_init(&pdev->dev, &timer_dev.gptu_mutex);
|
||||||
|
+ if (ret)
|
||||||
|
+ return ret;
|
||||||
+
|
+
|
||||||
+ lq_enable_gptu();
|
+ lq_enable_gptu();
|
||||||
+ timer_dev.number_of_timers = GPTU_ID_CFG * 2;
|
+ timer_dev.number_of_timers = GPTU_ID_CFG * 2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user