From: Jonathan Cameron <jic23@kernel.org>
To: Cai Huoqing <caihuoqing@baidu.com>
Cc: <lars@metafoo.de>, <linux-iio@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] iio: adc: ina2xx: Make use of the helper macro kthread_run()
Date: Thu, 28 Oct 2021 17:06:34 +0100 [thread overview]
Message-ID: <20211028170634.4e815890@jic23-huawei> (raw)
In-Reply-To: <20211021124254.3247-1-caihuoqing@baidu.com>
On Thu, 21 Oct 2021 20:42:53 +0800
Cai Huoqing <caihuoqing@baidu.com> wrote:
> 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>
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;
prev parent reply other threads:[~2021-10-28 16:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-21 12:42 Cai Huoqing
2021-10-21 12:42 ` [PATCH v2 2/2] iio: adc: ina2xx: Avoid double reference counting from get_task_struct/put_task_struct() Cai Huoqing
2021-10-28 16:06 ` Jonathan Cameron [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211028170634.4e815890@jic23-huawei \
--to=jic23@kernel.org \
--cc=caihuoqing@baidu.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®