public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: linux-acpi@vger.kernel.org, Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: Re: [PATCH] acer-wmi: Remove private workqueue
Date: Fri, 10 Oct 2008 23:59:51 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LFD.1.10.0810102359440.7059@localhost.localdomain> (raw)
In-Reply-To: <20081010163335.1889.75138.stgit@localhost>

applied.

thanks,
-len

On Fri, 10 Oct 2008, Carlos Corbacho wrote:

> As per Dmitry Torokhov's suggestion, acer-wmi doesn't need a private
> workqueue, so remove it.
> 
> Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
> 
>  drivers/misc/acer-wmi.c |   18 ++----------------
>  1 files changed, 2 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/misc/acer-wmi.c b/drivers/misc/acer-wmi.c
> index a6cb670..0532a2d 100644
> --- a/drivers/misc/acer-wmi.c
> +++ b/drivers/misc/acer-wmi.c
> @@ -930,8 +930,6 @@ static void acer_backlight_exit(void)
>  /*
>   * Rfkill devices
>   */
> -static struct workqueue_struct *rfkill_workqueue;
> -
>  static void acer_rfkill_update(struct work_struct *ignored);
>  static DECLARE_DELAYED_WORK(acer_rfkill_work, acer_rfkill_update);
>  static void acer_rfkill_update(struct work_struct *ignored)
> @@ -952,8 +950,7 @@ static void acer_rfkill_update(struct work_struct *ignored)
>  				RFKILL_STATE_SOFT_BLOCKED);
>  	}
>  
> -	queue_delayed_work(rfkill_workqueue, &acer_rfkill_work,
> -		round_jiffies_relative(HZ));
> +	schedule_delayed_work(&acer_rfkill_work, round_jiffies_relative(HZ));
>  }
>  
>  static int acer_rfkill_set(void *data, enum rfkill_state state)
> @@ -1018,17 +1015,7 @@ static int acer_rfkill_init(struct device *dev)
>  		}
>  	}
>  
> -	rfkill_workqueue = create_singlethread_workqueue("rfkill_workqueue");
> -	if (!rfkill_workqueue) {
> -		if (has_cap(ACER_CAP_BLUETOOTH)) {
> -			kfree(bluetooth_rfkill->data);
> -			rfkill_unregister(bluetooth_rfkill);
> -		}
> -		kfree(wireless_rfkill->data);
> -		rfkill_unregister(wireless_rfkill);
> -		return -ENOMEM;
> -	}
> -	queue_delayed_work(rfkill_workqueue, &acer_rfkill_work, HZ);
> +	schedule_delayed_work(&acer_rfkill_work, round_jiffies_relative(HZ));
>  
>  	return 0;
>  }
> @@ -1036,7 +1023,6 @@ static int acer_rfkill_init(struct device *dev)
>  static void acer_rfkill_exit(void)
>  {
>  	cancel_delayed_work_sync(&acer_rfkill_work);
> -	destroy_workqueue(rfkill_workqueue);
>  	kfree(wireless_rfkill->data);
>  	rfkill_unregister(wireless_rfkill);
>  	if (has_cap(ACER_CAP_BLUETOOTH)) {
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

      reply	other threads:[~2008-10-11  4:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-10 16:33 [PATCH] acer-wmi: Remove private workqueue Carlos Corbacho
2008-10-11  3:59 ` Len Brown [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=alpine.LFD.1.10.0810102359440.7059@localhost.localdomain \
    --to=lenb@kernel.org \
    --cc=carlos@strangeworlds.co.uk \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-acpi@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