Merge branches 'release', 'asus', 'sony-laptop' and 'thinkpad' into release
[pandora-kernel.git] / drivers / isdn / icn / icn.c
index 1e699bc..bf7997a 100644 (file)
@@ -12,6 +12,7 @@
 #include "icn.h"
 #include <linux/module.h>
 #include <linux/init.h>
+#include <linux/sched.h>
 
 static int portbase = ICN_BASEADDR;
 static unsigned long membase = ICN_MEMADDR;
@@ -1301,7 +1302,7 @@ icn_command(isdn_ctrl * c, icn_card * card)
                        }
                        break;
                case ISDN_CMD_DIAL:
-                       if (!card->flags & ICN_FLAGS_RUNNING)
+                       if (!(card->flags & ICN_FLAGS_RUNNING))
                                return -ENODEV;
                        if (card->leased)
                                break;
@@ -1327,7 +1328,7 @@ icn_command(isdn_ctrl * c, icn_card * card)
                        }
                        break;
                case ISDN_CMD_ACCEPTD:
-                       if (!card->flags & ICN_FLAGS_RUNNING)
+                       if (!(card->flags & ICN_FLAGS_RUNNING))
                                return -ENODEV;
                        if (c->arg < ICN_BCH) {
                                a = c->arg + 1;
@@ -1347,7 +1348,7 @@ icn_command(isdn_ctrl * c, icn_card * card)
                        }
                        break;
                case ISDN_CMD_ACCEPTB:
-                       if (!card->flags & ICN_FLAGS_RUNNING)
+                       if (!(card->flags & ICN_FLAGS_RUNNING))
                                return -ENODEV;
                        if (c->arg < ICN_BCH) {
                                a = c->arg + 1;
@@ -1365,7 +1366,7 @@ icn_command(isdn_ctrl * c, icn_card * card)
                        }
                        break;
                case ISDN_CMD_HANGUP:
-                       if (!card->flags & ICN_FLAGS_RUNNING)
+                       if (!(card->flags & ICN_FLAGS_RUNNING))
                                return -ENODEV;
                        if (c->arg < ICN_BCH) {
                                a = c->arg + 1;
@@ -1374,7 +1375,7 @@ icn_command(isdn_ctrl * c, icn_card * card)
                        }
                        break;
                case ISDN_CMD_SETEAZ:
-                       if (!card->flags & ICN_FLAGS_RUNNING)
+                       if (!(card->flags & ICN_FLAGS_RUNNING))
                                return -ENODEV;
                        if (card->leased)
                                break;
@@ -1390,7 +1391,7 @@ icn_command(isdn_ctrl * c, icn_card * card)
                        }
                        break;
                case ISDN_CMD_CLREAZ:
-                       if (!card->flags & ICN_FLAGS_RUNNING)
+                       if (!(card->flags & ICN_FLAGS_RUNNING))
                                return -ENODEV;
                        if (card->leased)
                                break;
@@ -1404,7 +1405,7 @@ icn_command(isdn_ctrl * c, icn_card * card)
                        }
                        break;
                case ISDN_CMD_SETL2:
-                       if (!card->flags & ICN_FLAGS_RUNNING)
+                       if (!(card->flags & ICN_FLAGS_RUNNING))
                                return -ENODEV;
                        if ((c->arg & 255) < ICN_BCH) {
                                a = c->arg;
@@ -1423,7 +1424,7 @@ icn_command(isdn_ctrl * c, icn_card * card)
                        }
                        break;
                case ISDN_CMD_SETL3:
-                       if (!card->flags & ICN_FLAGS_RUNNING)
+                       if (!(card->flags & ICN_FLAGS_RUNNING))
                                return -ENODEV;
                        return 0;
                default:
@@ -1470,7 +1471,7 @@ if_writecmd(const u_char __user *buf, int len, int id, int channel)
        icn_card *card = icn_findcard(id);
 
        if (card) {
-               if (!card->flags & ICN_FLAGS_RUNNING)
+               if (!(card->flags & ICN_FLAGS_RUNNING))
                        return -ENODEV;
                return (icn_writecmd(buf, len, 1, card));
        }
@@ -1485,7 +1486,7 @@ if_readstatus(u_char __user *buf, int len, int id, int channel)
        icn_card *card = icn_findcard(id);
 
        if (card) {
-               if (!card->flags & ICN_FLAGS_RUNNING)
+               if (!(card->flags & ICN_FLAGS_RUNNING))
                        return -ENODEV;
                return (icn_readstatus(buf, len, card));
        }
@@ -1500,7 +1501,7 @@ if_sendbuf(int id, int channel, int ack, struct sk_buff *skb)
        icn_card *card = icn_findcard(id);
 
        if (card) {
-               if (!card->flags & ICN_FLAGS_RUNNING)
+               if (!(card->flags & ICN_FLAGS_RUNNING))
                        return -ENODEV;
                return (icn_sendbuf(channel, ack, skb, card));
        }