drm: include kernel list header file in hashtab header
[safe/jmp/linux-2.6] / drivers / net / irda / irtty-sir.c
index 9e33196..d53aa95 100644 (file)
@@ -191,7 +191,7 @@ static int irtty_do_write(struct sir_dev *dev, const unsigned char *ptr, size_t
        tty = priv->tty;
        if (!tty->ops->write)
                return 0;
-       tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
+       set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
        writelen = tty_write_room(tty);
        if (writelen > len)
                writelen = len;
@@ -231,7 +231,7 @@ static void irtty_receive_buf(struct tty_struct *tty, const unsigned char *cp,
 
        dev = priv->dev;
        if (!dev) {
-               IRDA_WARNING("%s(), not ready yet!\n", __FUNCTION__);
+               IRDA_WARNING("%s(), not ready yet!\n", __func__);
                return;
        }
 
@@ -263,8 +263,7 @@ static void irtty_write_wakeup(struct tty_struct *tty)
        IRDA_ASSERT(priv != NULL, return;);
        IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return;);
 
-       tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP);
-
+       clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
        if (priv->dev)
                sirdev_write_complete(priv->dev);
 }
@@ -388,7 +387,7 @@ static int irtty_ioctl(struct tty_struct *tty, struct file *file, unsigned int c
        IRDA_ASSERT(priv != NULL, return -ENODEV;);
        IRDA_ASSERT(priv->magic == IRTTY_MAGIC, return -EBADR;);
 
-       IRDA_DEBUG(3, "%s(cmd=0x%X)\n", __FUNCTION__, cmd);
+       IRDA_DEBUG(3, "%s(cmd=0x%X)\n", __func__, cmd);
 
        dev = priv->dev;
        IRDA_ASSERT(dev != NULL, return -1;);
@@ -476,7 +475,7 @@ static int irtty_open(struct tty_struct *tty)
 
        mutex_unlock(&irtty_mutex);
 
-       IRDA_DEBUG(0, "%s - %s: irda line discipline opened\n", __FUNCTION__, tty->name);
+       IRDA_DEBUG(0, "%s - %s: irda line discipline opened\n", __func__, tty->name);
 
        return 0;
 
@@ -522,13 +521,13 @@ static void irtty_close(struct tty_struct *tty)
 
        /* Stop tty */
        irtty_stop_receiver(tty, TRUE);
-       tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP);
+       clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
        if (tty->ops->stop)
                tty->ops->stop(tty);
 
        kfree(priv);
 
-       IRDA_DEBUG(0, "%s - %s: irda line discipline closed\n", __FUNCTION__, tty->name);
+       IRDA_DEBUG(0, "%s - %s: irda line discipline closed\n", __func__, tty->name);
 }
 
 /* ------------------------------------------------------- */
@@ -566,7 +565,7 @@ static void __exit irtty_sir_cleanup(void)
 
        if ((err = tty_unregister_ldisc(N_IRDA))) {
                IRDA_ERROR("%s(), can't unregister line discipline (err = %d)\n",
-                          __FUNCTION__, err);
+                          __func__, err);
        }
 }