headers: remove sched.h from interrupt.h
[safe/jmp/linux-2.6] / drivers / ieee1394 / raw1394.c
index 9b71390..8aa56ac 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <linux/kernel.h>
 #include <linux/list.h>
+#include <linux/sched.h>
 #include <linux/string.h>
 #include <linux/slab.h>
 #include <linux/fs.h>
@@ -2272,8 +2273,10 @@ static ssize_t raw1394_write(struct file *file, const char __user * buffer,
                return -EFAULT;
        }
 
-       if (!mutex_trylock(&fi->state_mutex))
+       if (!mutex_trylock(&fi->state_mutex)) {
+               free_pending_request(req);
                return -EAGAIN;
+       }
 
        switch (fi->state) {
        case opened:
@@ -2982,7 +2985,7 @@ static int raw1394_release(struct inode *inode, struct file *file)
  * Export information about protocols/devices supported by this driver.
  */
 #ifdef MODULE
-static struct ieee1394_device_id raw1394_id_table[] = {
+static const struct ieee1394_device_id raw1394_id_table[] = {
        {
         .match_flags = IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION,
         .specifier_id = AVC_UNIT_SPEC_ID_ENTRY & 0xffffff,