summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolmes Chou <holmeschou@google.com>2022-03-07 17:21:01 +0800
committerHolmes Chou <holmeschou@google.com>2022-03-10 00:20:00 +0800
commitc73a3c2af02c228958a6bd3e459640816d0d29bd (patch)
treed6c8100e9f85266354b1e0351bd2453cd928a1f5
parent16f5d947b81bc338bce1b3e3a4bcd73afce7d5ec (diff)
downloadlwis-c73a3c2af02c228958a6bd3e459640816d0d29bd.tar.gz
LWIS: Initialize kthread workers for top deviceandroid-t-beta-1_r0.4android-gs-raviole-5.10-t-beta-1
Initialize top device kthread workers Bug: 222699757 Test: atest liblyric.lwis_test, GCA, CTS Signed-off-by: Holmes Chou <holmeschou@google.com> Change-Id: I92293c897c92071615537acf652d9ad4233d094a
-rw-r--r--lwis_device_i2c.c2
-rw-r--r--lwis_device_ioreg.c2
-rw-r--r--lwis_device_top.c14
3 files changed, 14 insertions, 4 deletions
diff --git a/lwis_device_i2c.c b/lwis_device_i2c.c
index 0ff67dc..28e6d81 100644
--- a/lwis_device_i2c.c
+++ b/lwis_device_i2c.c
@@ -255,7 +255,7 @@ static int lwis_i2c_device_probe(struct platform_device *plat_dev)
goto error_probe;
}
- /* Create an associated kworker thread */
+ /* Create associated kworker threads */
ret = lwis_create_kthread_workers(&i2c_dev->base_dev, "lwis_i2c_trans_kthread",
"lwis_i2c_prd_io_kthread");
if (ret) {
diff --git a/lwis_device_ioreg.c b/lwis_device_ioreg.c
index 83c76ba..ec3b6b9 100644
--- a/lwis_device_ioreg.c
+++ b/lwis_device_ioreg.c
@@ -127,7 +127,7 @@ static int lwis_ioreg_device_probe(struct platform_device *plat_dev)
goto error_probe;
}
- /* Create an associated kworker thread */
+ /* Create associated kworker threads */
ret = lwis_create_kthread_workers(&ioreg_dev->base_dev, "lwis_ioreg_trans_kthread",
"lwis_ioreg_prd_io_kthread");
if (ret) {
diff --git a/lwis_device_top.c b/lwis_device_top.c
index f435b63..e562d7f 100644
--- a/lwis_device_top.c
+++ b/lwis_device_top.c
@@ -13,6 +13,7 @@
#include "lwis_device_top.h"
#include "lwis_event.h"
#include "lwis_init.h"
+#include "lwis_util.h"
#include <linux/device.h>
#include <linux/init.h>
@@ -477,7 +478,7 @@ static int lwis_top_device_probe(struct platform_device *plat_dev)
top_dev->base_dev.subscribe_ops = top_subscribe_ops;
/* Call the base device probe function */
- ret = lwis_base_probe((struct lwis_device *)top_dev, plat_dev);
+ ret = lwis_base_probe(&top_dev->base_dev, plat_dev);
if (ret) {
pr_err("Error in lwis base probe\n");
goto error_probe;
@@ -487,12 +488,21 @@ static int lwis_top_device_probe(struct platform_device *plat_dev)
ret = lwis_top_device_setup(top_dev);
if (ret) {
dev_err(top_dev->base_dev.dev, "Error in top device initialization\n");
- lwis_base_unprobe((struct lwis_device *)top_dev);
+ lwis_base_unprobe(&top_dev->base_dev);
goto error_probe;
}
lwis_top_event_subscribe_init(top_dev);
+ /* Create associated kworker threads */
+ ret = lwis_create_kthread_workers(&top_dev->base_dev, "lwis_top_trans_kthread",
+ "lwis_top_prd_io_kthread");
+ if (ret) {
+ dev_err(top_dev->base_dev.dev, "Failed to create lwis_top_kthread");
+ lwis_base_unprobe(&top_dev->base_dev);
+ goto error_probe;
+ }
+
return 0;
error_probe: