OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc19fa6
)
iio: adc: ina2xx: Make use of the helper macro kthread_run()
author
Cai Huoqing
<caihuoqing@baidu.com>
Thu, 21 Oct 2021 12:42:53 +0000
(20:42 +0800)
committer
Jonathan Cameron
<Jonathan.Cameron@huawei.com>
Wed, 17 Nov 2021 17:51:34 +0000
(17:51 +0000)
Repalce kthread_create/wake_up_process() with kthread_run()
to simplify the code.
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Link:
https://lore.kernel.org/r/20211021124254.3247-1-caihuoqing@baidu.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ina2xx-adc.c
patch
|
blob
|
history
diff --git
a/drivers/iio/adc/ina2xx-adc.c
b/drivers/iio/adc/ina2xx-adc.c
index
a4b2ff9
..
360d7a0
100644
(file)
--- a/
drivers/iio/adc/ina2xx-adc.c
+++ b/
drivers/iio/adc/ina2xx-adc.c
@@
-842,15
+842,14
@@
static int ina2xx_buffer_enable(struct iio_dev *indio_dev)
dev_dbg(&indio_dev->dev, "Async readout mode: %d\n",
chip->allow_async_readout);
- task = kthread_
create
(ina2xx_capture_thread, (void *)indio_dev,
-
"%s:%d-%uus", indio_dev->name,
-
iio_device_id(indio_dev),
-
sampling_us);
+ task = kthread_
run
(ina2xx_capture_thread, (void *)indio_dev,
+ "%s:%d-%uus", indio_dev->name,
+ iio_device_id(indio_dev),
+ sampling_us);
if (IS_ERR(task))
return PTR_ERR(task);
get_task_struct(task);
- wake_up_process(task);
chip->task = task;
return 0;