mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marc Dietrich <marvin24@gmx.de>
To: Tejun Heo <tj@kernel.org>
Cc: Julian Andres Klode <jak@jak-linux.org>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH staging] nvec: use system_nrt_wq instead of custom one
Date: Fri, 24 Aug 2012 09:38:35 +0200	[thread overview]
Message-ID: <3351764.3akYJnKF5N@fb07-iapwap2> (raw)
In-Reply-To: <20120822223238.GO19212@google.com>

Am Mittwoch, 22. August 2012, 15:32:38 schrieb Tejun Heo:
> There isn't much reason to use custom workqueue in nvec.  It can use
> system_nrt_wq instead and cancel the two work items on removal.
> 
> Signed-off-by: Tejun Heo <tj@kernel.org>
> ---
> Marc, I think I'll do this conversion in two steps.  system_nrt_wq ->
> system_wq conversion should be trivial after 3.7 merge window.

I'm fine with that. Thanks for spitting up the large patch.
I cc the staging list.

Greg, can you pick it up for 3.7?

Signed-off-by: Marc Dietrich <marvin24@gmx.de>

>  drivers/staging/nvec/nvec.c |   10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
> index 695ea35..daaef24 100644
> --- a/drivers/staging/nvec/nvec.c
> +++ b/drivers/staging/nvec/nvec.c
> @@ -264,7 +264,7 @@ int nvec_write_async(struct nvec_chip *nvec, const
> unsigned char *data, list_add_tail(&msg->node, &nvec->tx_data);
>  	spin_unlock_irqrestore(&nvec->tx_lock, flags);
> 
> -	queue_work(nvec->wq, &nvec->tx_work);
> +	queue_work(system_nrt_wq, &nvec->tx_work);
> 
>  	return 0;
>  }
> @@ -470,7 +470,7 @@ static void nvec_rx_completed(struct nvec_chip *nvec)
>  	if (!nvec_msg_is_event(nvec->rx))
>  		complete(&nvec->ec_transfer);
> 
> -	queue_work(nvec->wq, &nvec->rx_work);
> +	queue_work(system_nrt_wq, &nvec->rx_work);
>  }
> 
>  /**
> @@ -791,13 +791,11 @@ static int __devinit tegra_nvec_probe(struct
> platform_device *pdev) INIT_LIST_HEAD(&nvec->tx_data);
>  	INIT_WORK(&nvec->rx_work, nvec_dispatch);
>  	INIT_WORK(&nvec->tx_work, nvec_request_master);
> -	nvec->wq = alloc_workqueue("nvec", WQ_NON_REENTRANT, 2);
> 
>  	err = devm_gpio_request_one(&pdev->dev, nvec->gpio, GPIOF_OUT_INIT_HIGH,
>  					"nvec gpio");
>  	if (err < 0) {
>  		dev_err(nvec->dev, "couldn't request gpio\n");
> -		destroy_workqueue(nvec->wq);
>  		return -ENODEV;
>  	}
> 
> @@ -805,7 +803,6 @@ static int __devinit tegra_nvec_probe(struct
> platform_device *pdev) "nvec", nvec);
>  	if (err) {
>  		dev_err(nvec->dev, "couldn't request irq\n");
> -		destroy_workqueue(nvec->wq);
>  		return -ENODEV;
>  	}
>  	disable_irq(nvec->irq);
> @@ -859,7 +856,8 @@ static int __devexit tegra_nvec_remove(struct
> platform_device *pdev)
> 
>  	nvec_write_async(nvec, EC_DISABLE_EVENT_REPORTING, 3);
>  	mfd_remove_devices(nvec->dev);
> -	destroy_workqueue(nvec->wq);
> +	cancel_work_sync(&nvec->rx_work);
> +	cancel_work_sync(&nvec->tx_work);
> 
>  	return 0;
>  }

      reply	other threads:[~2012-08-24  7:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-22 22:32 Tejun Heo
2012-08-24  7:38 ` Marc Dietrich [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=3351764.3akYJnKF5N@fb07-iapwap2 \
    --to=marvin24@gmx.de \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jak@jak-linux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@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

Powered by JetHome