Commit 8fa8bea7 authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Greg Kroah-Hartman

auxdisplay: ht16k33: remove private workqueue

There is no need for the driver to use private workqueue, standard system
workqueue should suffice as they are going to use the same worker pool
anyway.
Acked-by: default avatarRobin van der Gracht <robin@protonic.nl>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cac513f1
...@@ -80,7 +80,6 @@ struct ht16k33_priv { ...@@ -80,7 +80,6 @@ struct ht16k33_priv {
struct i2c_client *client; struct i2c_client *client;
struct ht16k33_keypad keypad; struct ht16k33_keypad keypad;
struct ht16k33_fbdev fbdev; struct ht16k33_fbdev fbdev;
struct workqueue_struct *workqueue;
}; };
static struct fb_fix_screeninfo ht16k33_fb_fix = { static struct fb_fix_screeninfo ht16k33_fb_fix = {
...@@ -126,7 +125,7 @@ static void ht16k33_fb_queue(struct ht16k33_priv *priv) ...@@ -126,7 +125,7 @@ static void ht16k33_fb_queue(struct ht16k33_priv *priv)
{ {
struct ht16k33_fbdev *fbdev = &priv->fbdev; struct ht16k33_fbdev *fbdev = &priv->fbdev;
queue_delayed_work(priv->workqueue, &fbdev->work, schedule_delayed_work(&fbdev->work,
msecs_to_jiffies(HZ / fbdev->refresh_rate)); msecs_to_jiffies(HZ / fbdev->refresh_rate));
} }
...@@ -414,21 +413,15 @@ static int ht16k33_probe(struct i2c_client *client, ...@@ -414,21 +413,15 @@ static int ht16k33_probe(struct i2c_client *client,
i2c_set_clientdata(client, priv); i2c_set_clientdata(client, priv);
fbdev = &priv->fbdev; fbdev = &priv->fbdev;
priv->workqueue = create_singlethread_workqueue(DRIVER_NAME "-wq");
if (priv->workqueue == NULL)
return -ENOMEM;
err = ht16k33_initialize(priv); err = ht16k33_initialize(priv);
if (err) if (err)
goto err_destroy_wq; return err;
/* Framebuffer (2 bytes per column) */ /* Framebuffer (2 bytes per column) */
BUILD_BUG_ON(PAGE_SIZE < HT16K33_FB_SIZE); BUILD_BUG_ON(PAGE_SIZE < HT16K33_FB_SIZE);
fbdev->buffer = (unsigned char *) get_zeroed_page(GFP_KERNEL); fbdev->buffer = (unsigned char *) get_zeroed_page(GFP_KERNEL);
if (!fbdev->buffer) { if (!fbdev->buffer)
err = -ENOMEM; return -ENOMEM;
goto err_destroy_wq;
}
fbdev->cache = devm_kmalloc(&client->dev, HT16K33_FB_SIZE, GFP_KERNEL); fbdev->cache = devm_kmalloc(&client->dev, HT16K33_FB_SIZE, GFP_KERNEL);
if (!fbdev->cache) { if (!fbdev->cache) {
...@@ -505,8 +498,6 @@ static int ht16k33_probe(struct i2c_client *client, ...@@ -505,8 +498,6 @@ static int ht16k33_probe(struct i2c_client *client,
framebuffer_release(fbdev->info); framebuffer_release(fbdev->info);
err_fbdev_buffer: err_fbdev_buffer:
free_page((unsigned long) fbdev->buffer); free_page((unsigned long) fbdev->buffer);
err_destroy_wq:
destroy_workqueue(priv->workqueue);
return err; return err;
} }
...@@ -521,7 +512,6 @@ static int ht16k33_remove(struct i2c_client *client) ...@@ -521,7 +512,6 @@ static int ht16k33_remove(struct i2c_client *client)
framebuffer_release(fbdev->info); framebuffer_release(fbdev->info);
free_page((unsigned long) fbdev->buffer); free_page((unsigned long) fbdev->buffer);
destroy_workqueue(priv->workqueue);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment