]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Remove dead code
authorAndries E. Brouwer <andries.brouwer@cwi.nl>
Thu, 6 Feb 2003 08:22:48 +0000 (00:22 -0800)
committerChristoph Hellwig <hch@lab343.munich.sgi.com>
Thu, 6 Feb 2003 08:22:48 +0000 (00:22 -0800)
In struct char_dev the fields openers and sem are unused.
The file char_dev.c claims that it is called differently.

fs/char_dev.c
include/linux/fs.h

index ff34b5e336cde6f5d5526b05ee5cfa5676adbda1..ec9489c3a387d760b52a8f311b7143c8a979bf42 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/fs/block_dev.c
+ *  linux/fs/char_dev.c
  *
  *  Copyright (C) 1991, 1992  Linus Torvalds
  */
@@ -38,16 +38,13 @@ static kmem_cache_t * cdev_cachep;
         ((struct char_device *) kmem_cache_alloc(cdev_cachep, SLAB_KERNEL))
 #define destroy_cdev(cdev) kmem_cache_free(cdev_cachep, (cdev))
 
-static void init_once(void * foo, kmem_cache_t * cachep, unsigned long flags)
+static void init_once(void *foo, kmem_cache_t *cachep, unsigned long flags)
 {
-       struct char_device * cdev = (struct char_device *) foo;
+       struct char_device *cdev = (struct char_device *) foo;
 
        if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) ==
            SLAB_CTOR_CONSTRUCTOR)
-       {
                memset(cdev, 0, sizeof(*cdev));
-               sema_init(&cdev->sem, 1);
-       }
 }
 
 void __init cdev_cache_init(void)
index 9a17c9819ae916aea5f5d880e0ffc73b48a628eb..037c1fe2ad6ce01a7ae7d7e3fee1e8a96d6dda00 100644 (file)
@@ -332,8 +332,6 @@ struct char_device {
        struct list_head        hash;
        atomic_t                count;
        dev_t                   dev;
-       atomic_t                openers;
-       struct semaphore        sem;
 };
 
 struct block_device {