From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Robin van der Gracht <robin@protonic.nl>,
Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
Cc: linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH 3/3] auxdisplay: ht16k33: remove private workqueue
Date: Tue, 31 Jan 2017 12:54:38 -0800 [thread overview]
Message-ID: <20170131205438.7531-3-dmitry.torokhov@gmail.com> (raw)
In-Reply-To: <20170131205438.7531-1-dmitry.torokhov@gmail.com>
There is no need for the driver to user private workqueue, standard system
workqueue should suffice as they going to use the same worker pool anyway.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/auxdisplay/ht16k33.c | 20 +++++---------------
1 file changed, 5 insertions(+), 15 deletions(-)
diff --git a/drivers/auxdisplay/ht16k33.c b/drivers/auxdisplay/ht16k33.c
index b2fbe68c7fa9..533886a59cec 100644
--- a/drivers/auxdisplay/ht16k33.c
+++ b/drivers/auxdisplay/ht16k33.c
@@ -80,7 +80,6 @@ struct ht16k33_priv {
struct i2c_client *client;
struct ht16k33_keypad keypad;
struct ht16k33_fbdev fbdev;
- struct workqueue_struct *workqueue;
};
static struct fb_fix_screeninfo ht16k33_fb_fix = {
@@ -126,8 +125,8 @@ static void ht16k33_fb_queue(struct ht16k33_priv *priv)
{
struct ht16k33_fbdev *fbdev = &priv->fbdev;
- queue_delayed_work(priv->workqueue, &fbdev->work,
- msecs_to_jiffies(HZ / fbdev->refresh_rate));
+ schedule_delayed_work(&fbdev->work,
+ msecs_to_jiffies(HZ / fbdev->refresh_rate));
}
/*
@@ -414,21 +413,15 @@ static int ht16k33_probe(struct i2c_client *client,
i2c_set_clientdata(client, priv);
fbdev = &priv->fbdev;
- priv->workqueue = create_singlethread_workqueue(DRIVER_NAME "-wq");
- if (priv->workqueue == NULL)
- return -ENOMEM;
-
err = ht16k33_initialize(priv);
if (err)
- goto err_destroy_wq;
+ return err;
/* Framebuffer (2 bytes per column) */
BUILD_BUG_ON(PAGE_SIZE < HT16K33_FB_SIZE);
fbdev->buffer = (unsigned char *) get_zeroed_page(GFP_KERNEL);
- if (!fbdev->buffer) {
- err = -ENOMEM;
- goto err_destroy_wq;
- }
+ if (!fbdev->buffer)
+ return -ENOMEM;
fbdev->cache = devm_kmalloc(&client->dev, HT16K33_FB_SIZE, GFP_KERNEL);
if (!fbdev->cache) {
@@ -505,8 +498,6 @@ static int ht16k33_probe(struct i2c_client *client,
framebuffer_release(fbdev->info);
err_fbdev_buffer:
free_page((unsigned long) fbdev->buffer);
-err_destroy_wq:
- destroy_workqueue(priv->workqueue);
return err;
}
@@ -521,7 +512,6 @@ static int ht16k33_remove(struct i2c_client *client)
framebuffer_release(fbdev->info);
free_page((unsigned long) fbdev->buffer);
- destroy_workqueue(priv->workqueue);
return 0;
}
--
2.11.0.483.g087da7b7c-goog
next prev parent reply other threads:[~2017-01-31 20:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-31 20:54 [PATCH 1/3] auxdisplay: ht16k33: do not try to free fbdev Dmitry Torokhov
2017-01-31 20:54 ` [PATCH 2/3] auxdisplay: ht16k33: rework input device initialization Dmitry Torokhov
2017-02-08 16:48 ` Robin van der Gracht
2017-02-09 18:10 ` Dmitry Torokhov
2017-01-31 20:54 ` Dmitry Torokhov [this message]
2017-02-08 16:52 ` [PATCH 3/3] auxdisplay: ht16k33: remove private workqueue Robin van der Gracht
2017-02-07 7:45 ` [PATCH 1/3] auxdisplay: ht16k33: do not try to free fbdev Robin van der Gracht
2017-02-08 16:12 ` Robin van der Gracht
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=20170131205438.7531-3-dmitry.torokhov@gmail.com \
--to=dmitry.torokhov@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=robin@protonic.nl \
/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