Staging: heci: do not print error when heci_bh_handler is already on workqueue
authorDongxiao Xu <dongxiao.xu@intel.com>
Sun, 31 May 2009 06:43:58 +0000 (14:43 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 19 Jun 2009 18:00:55 +0000 (11:00 -0700)
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: Nikanth Karthikesan <knikanth@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/heci/interrupt.c

index 3a510ed3a3d2b93c70f69520b2999dbf3d5e9c28..2a3a01a62bbf748d3fe43e6cb0718d8242c6add8 100644 (file)
@@ -103,10 +103,8 @@ irqreturn_t heci_isr_interrupt(int irq, void *dev_id)
        PREPARE_WORK(&dev->work, heci_bh_handler);
        DBG("schedule work the heci_bh_handler.\n");
        err = schedule_work(&dev->work);
-       if (!err) {
-               printk(KERN_ERR "heci: schedule the heci_bh_handler"
-                      " failed error=%x\n", err);
-       }
+       if (!err)
+               DBG("heci_bh_handler was already on the workqueue.\n");
        return IRQ_HANDLED;
 }
 
@@ -260,10 +258,8 @@ end:
                PREPARE_WORK(&dev->work, heci_bh_handler);
                DBG("schedule work the heci_bh_handler.\n");
                rets = schedule_work(&dev->work);
-               if (!rets) {
-                       printk(KERN_ERR "heci: schedule the heci_bh_handler"
-                              " failed error=%x\n", rets);
-               }
+               if (!rets)
+                       DBG("heci_bh_handler was already queued.\n");
        } else {
                heci_csr_enable_interrupts(dev);
        }