Commit d28fa03d authored by Russell King's avatar Russell King

[ARM] Ecard initialisation tweaks.

Start ecard_task at initialisation time.
Statically initialise ecard wait queue head.
parent d50a4a04
...@@ -221,8 +221,7 @@ static void ecard_do_request(struct ecard_request *req) ...@@ -221,8 +221,7 @@ static void ecard_do_request(struct ecard_request *req)
#include <linux/completion.h> #include <linux/completion.h>
static pid_t ecard_pid; static DECLARE_WAIT_QUEUE_HEAD(ecard_wait);
static wait_queue_head_t ecard_wait;
static struct ecard_request *ecard_req; static struct ecard_request *ecard_req;
static DECLARE_MUTEX(ecard_sem); static DECLARE_MUTEX(ecard_sem);
static DECLARE_COMPLETION(ecard_completion); static DECLARE_COMPLETION(ecard_completion);
...@@ -320,9 +319,6 @@ ecard_call(struct ecard_request *req) ...@@ -320,9 +319,6 @@ ecard_call(struct ecard_request *req)
if (current == &init_task || in_interrupt()) if (current == &init_task || in_interrupt())
BUG(); BUG();
if (ecard_pid <= 0)
ecard_pid = kernel_thread(ecard_task, NULL, CLONE_KERNEL);
down(&ecard_sem); down(&ecard_sem);
ecard_req = req; ecard_req = req;
wake_up(&ecard_wait); wake_up(&ecard_wait);
...@@ -1061,9 +1057,14 @@ ecard_probe(int slot, card_type_t type) ...@@ -1061,9 +1057,14 @@ ecard_probe(int slot, card_type_t type)
*/ */
static int __init ecard_init(void) static int __init ecard_init(void)
{ {
int slot, irqhw; int slot, irqhw, ret;
init_waitqueue_head(&ecard_wait); ret = kernel_thread(ecard_task, NULL, CLONE_KERNEL);
if (ret < 0) {
printk(KERN_ERR "Ecard: unable to create kernel thread: %d\n",
ret);
return ret;
}
printk("Probing expansion cards\n"); printk("Probing expansion cards\n");
......
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