Commit 813caf8d authored by Vikram Narayanan's avatar Vikram Narayanan
Browse files

lcd/nullnet: Switch to waitqueue


Signed-off-by: Vikram Narayanan's avatarVikram Narayanan <vikram186@gmail.com>
parent 764aae8e
......@@ -129,6 +129,9 @@ fail1:
return ret;
}
static DECLARE_WAIT_QUEUE_HEAD(wq);
static int shutdown = 0;
int boot_lcd_thread(void *data)
{
static unsigned once = 0;
......@@ -140,14 +143,14 @@ int boot_lcd_thread(void *data)
});
}
once = 1;
schedule();
wait_event_interruptible(wq, shutdown != 0);
}
LIBLCD_MSG("Exiting thread");
lcd_cap_delete(dummy_lcd);
lcd_destroy_create_ctx(dummy_ctx);
if (current->lcd)
lcd_cap_delete(dummy_lcd);
if (dummy_ctx)
lcd_destroy_create_ctx(dummy_ctx);
msleep(10000);
lcd_destroy_module_klcd(net_klcd, "lcd_test_mod_nullnet_net_klcd");
lcd_exit(0);
return 0;
}
......@@ -170,6 +173,8 @@ static void boot_exit(void)
/* nothing to do */
if (!IS_ERR(boot_task)) {
LIBLCD_MSG("%s: exiting", __func__);
shutdown = 1;
wake_up_interruptible(&wq);
kthread_stop(boot_task);
}
}
......
Supports Markdown
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