Commit 8d1c50e9 authored by Dongxiao Xu's avatar Dongxiao Xu Committed by Greg Kroah-Hartman

Staging: heci: do not print error when heci_bh_handler is already on workqueue

schedule_work returns 0, if the work is already on the work_queue, else
returns non-zero. Do not print error message if heci_bh_handlerwork was
already on queue.
Signed-off-by: default avatarNikanth Karthikesan <knikanth@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ad914a3e
...@@ -103,10 +103,8 @@ irqreturn_t heci_isr_interrupt(int irq, void *dev_id) ...@@ -103,10 +103,8 @@ irqreturn_t heci_isr_interrupt(int irq, void *dev_id)
PREPARE_WORK(&dev->work, heci_bh_handler); PREPARE_WORK(&dev->work, heci_bh_handler);
DBG("schedule work the heci_bh_handler.\n"); DBG("schedule work the heci_bh_handler.\n");
err = schedule_work(&dev->work); err = schedule_work(&dev->work);
if (!err) { if (!err)
printk(KERN_ERR "heci: schedule the heci_bh_handler" DBG("heci_bh_handler was already on the workqueue.\n");
" failed error=%x\n", err);
}
return IRQ_HANDLED; return IRQ_HANDLED;
} }
...@@ -260,10 +258,8 @@ static void heci_bh_handler(struct work_struct *work) ...@@ -260,10 +258,8 @@ static void heci_bh_handler(struct work_struct *work)
PREPARE_WORK(&dev->work, heci_bh_handler); PREPARE_WORK(&dev->work, heci_bh_handler);
DBG("schedule work the heci_bh_handler.\n"); DBG("schedule work the heci_bh_handler.\n");
rets = schedule_work(&dev->work); rets = schedule_work(&dev->work);
if (!rets) { if (!rets)
printk(KERN_ERR "heci: schedule the heci_bh_handler" DBG("heci_bh_handler was already queued.\n");
" failed error=%x\n", rets);
}
} else { } else {
heci_csr_enable_interrupts(dev); heci_csr_enable_interrupts(dev);
} }
......
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