]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/plat-omap/dsp/proclist.h
OMAP: DSP: N800: remaining updates for dsp parts
[linux-2.6-omap-h63xx.git] / arch / arm / plat-omap / dsp / proclist.h
index cc5c3e0c0eb8a9d893e932a1e2255ad2f530edd6..666ca4dd45d7244f8d9f6c1109732c369a5ffc2a 100644 (file)
  *
  */
 
+#ifndef __PLAT_OMAP_DSP_PROCLIST_H
+#define __PLAT_OMAP_DSP_PROCLIST_H
+
 struct proc_list {
        struct list_head list_head;
        pid_t pid;
        struct file *file;
 };
 
-static __inline__ void proc_list_add(spinlock_t *lock, struct list_head *list,
+static inline int proc_list_add(spinlock_t *lock, struct list_head *list,
                                     struct task_struct *tsk, struct file *file)
 {
        struct proc_list *new;
 
        new = kmalloc(sizeof(struct proc_list), GFP_KERNEL);
+       if (new == NULL)
+               return -ENOMEM;
        new->pid = tsk->pid;
        new->file = file;
        spin_lock(lock);
        list_add_tail(&new->list_head, list);
        spin_unlock(lock);
+
+       return 0;
 }
 
-static __inline__ void proc_list_del(spinlock_t *lock, struct list_head *list,
+static inline void proc_list_del(spinlock_t *lock, struct list_head *list,
                                     struct task_struct *tsk, struct file *file)
 {
        struct proc_list *pl;
@@ -64,7 +71,7 @@ static __inline__ void proc_list_del(spinlock_t *lock, struct list_head *list,
        spin_unlock(lock);
 }
 
-static __inline__ void proc_list_flush(spinlock_t *lock, struct list_head *list)
+static inline void proc_list_flush(spinlock_t *lock, struct list_head *list)
 {
        struct proc_list *pl;
 
@@ -76,3 +83,5 @@ static __inline__ void proc_list_flush(spinlock_t *lock, struct list_head *list)
        }
        spin_unlock(lock);
 }
+
+#endif /* __PLAT_OMAP_DSP_PROCLIST_H */