Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
[linux-drm-fsl-dcu.git] / include / scsi / libsas.h
index b09bdd8c339470f24a2fd27489460f6c87acc48e..0689e004a281e3b2fdcc7f8e1d5d6770b9b63180 100644 (file)
@@ -557,11 +557,10 @@ struct sas_task {
 
 static inline struct sas_task *sas_alloc_task(gfp_t flags)
 {
-       extern kmem_cache_t *sas_task_cache;
-       struct sas_task *task = kmem_cache_alloc(sas_task_cache, flags);
+       extern struct kmem_cache *sas_task_cache;
+       struct sas_task *task = kmem_cache_zalloc(sas_task_cache, flags);
 
        if (task) {
-               memset(task, 0, sizeof(*task));
                INIT_LIST_HEAD(&task->list);
                spin_lock_init(&task->task_state_lock);
                task->task_state_flags = SAS_TASK_STATE_PENDING;
@@ -575,7 +574,7 @@ static inline struct sas_task *sas_alloc_task(gfp_t flags)
 static inline void sas_free_task(struct sas_task *task)
 {
        if (task) {
-               extern kmem_cache_t *sas_task_cache;
+               extern struct kmem_cache *sas_task_cache;
                BUG_ON(!list_empty(&task->list));
                kmem_cache_free(sas_task_cache, task);
        }
@@ -646,6 +645,6 @@ void sas_unregister_dev(struct domain_device *);
 
 void sas_init_dev(struct domain_device *);
 
-void sas_task_abort(struct sas_task *task);
+void sas_task_abort(struct work_struct *);
 
 #endif /* _SASLIB_H_ */