[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20211028170634.4e815890@jic23-huawei>
Date: Thu, 28 Oct 2021 17:06:34 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Cai Huoqing <caihuoqing@...du.com>
Cc: <lars@...afoo.de>, <linux-iio@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/2] iio: adc: ina2xx: Make use of the helper macro
kthread_run()
On Thu, 21 Oct 2021 20:42:53 +0800
Cai Huoqing <caihuoqing@...du.com> wrote:
> Repalce kthread_create/wake_up_process() with kthread_run()
> to simplify the code.
>
> Reviewed-by: Lars-Peter Clausen <lars@...afoo.de>
> Signed-off-by: Cai Huoqing <caihuoqing@...du.com>
Series applied to the togreg branch of iio.git which is pushed out initially
as testing for 0-day to see if it can find any problems we missed.
Thanks,
Jonathan
> ---
> v1->v2: Sort with [2/2] patch as a series.
>
> drivers/iio/adc/ina2xx-adc.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/iio/adc/ina2xx-adc.c b/drivers/iio/adc/ina2xx-adc.c
> index a4b2ff9e0dd5..360d7a00f60d 100644
> --- 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;
Powered by blists - more mailing lists