Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
[pandora-kernel.git] / drivers / infiniband / core / cache.c
index 20e9f64..558c9a0 100644 (file)
@@ -38,7 +38,6 @@
 #include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/slab.h>
-#include <linux/sched.h>       /* INIT_WORK, schedule_work(), flush_scheduled_work() */
 
 #include <rdma/ib_cache.h>
 
@@ -285,9 +284,10 @@ err:
        kfree(tprops);
 }
 
-static void ib_cache_task(void *work_ptr)
+static void ib_cache_task(struct work_struct *_work)
 {
-       struct ib_update_work *work = work_ptr;
+       struct ib_update_work *work =
+               container_of(_work, struct ib_update_work, work);
 
        ib_cache_update(work->device, work->port_num);
        kfree(work);
@@ -306,7 +306,7 @@ static void ib_cache_event(struct ib_event_handler *handler,
            event->event == IB_EVENT_CLIENT_REREGISTER) {
                work = kmalloc(sizeof *work, GFP_ATOMIC);
                if (work) {
-                       INIT_WORK(&work->work, ib_cache_task, work);
+                       INIT_WORK(&work->work, ib_cache_task);
                        work->device   = event->device;
                        work->port_num = event->element.port_num;
                        schedule_work(&work->work);