Commit 6b932555 authored by Andries E. Brouwer's avatar Andries E. Brouwer Committed by Christoph Hellwig

[PATCH] Remove dead code

In struct char_dev the fields openers and sem are unused.
The file char_dev.c claims that it is called differently.
parent 1dbb976e
/*
* 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)
......
......@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment