diff options
author | David S. Miller <davem@davemloft.net> | 2011-01-24 16:17:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-24 16:17:06 -0500 |
commit | e92427b289d252cfbd4cb5282d92f4ce1a5bb1fb (patch) | |
tree | 6d30e5e7b7f8e9aaa51d43b7128ac56860fa03bb /fs/char_dev.c | |
parent | c506653d35249bb4738bb139c24362e1ae724bc1 (diff) | |
parent | ec30f343d61391ab23705e50a525da1d55395780 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/char_dev.c')
-rw-r--r-- | fs/char_dev.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/fs/char_dev.c b/fs/char_dev.c index e5b9df993b93..dca9e5e0f73b 100644 --- a/fs/char_dev.c +++ b/fs/char_dev.c | |||
@@ -59,7 +59,7 @@ static struct char_device_struct { | |||
59 | } *chrdevs[CHRDEV_MAJOR_HASH_SIZE]; | 59 | } *chrdevs[CHRDEV_MAJOR_HASH_SIZE]; |
60 | 60 | ||
61 | /* index in the above */ | 61 | /* index in the above */ |
62 | static inline int major_to_index(int major) | 62 | static inline int major_to_index(unsigned major) |
63 | { | 63 | { |
64 | return major % CHRDEV_MAJOR_HASH_SIZE; | 64 | return major % CHRDEV_MAJOR_HASH_SIZE; |
65 | } | 65 | } |
@@ -417,18 +417,6 @@ static int chrdev_open(struct inode *inode, struct file *filp) | |||
417 | return ret; | 417 | return ret; |
418 | } | 418 | } |
419 | 419 | ||
420 | int cdev_index(struct inode *inode) | ||
421 | { | ||
422 | int idx; | ||
423 | struct kobject *kobj; | ||
424 | |||
425 | kobj = kobj_lookup(cdev_map, inode->i_rdev, &idx); | ||
426 | if (!kobj) | ||
427 | return -1; | ||
428 | kobject_put(kobj); | ||
429 | return idx; | ||
430 | } | ||
431 | |||
432 | void cd_forget(struct inode *inode) | 420 | void cd_forget(struct inode *inode) |
433 | { | 421 | { |
434 | spin_lock(&cdev_lock); | 422 | spin_lock(&cdev_lock); |
@@ -582,7 +570,6 @@ EXPORT_SYMBOL(cdev_init); | |||
582 | EXPORT_SYMBOL(cdev_alloc); | 570 | EXPORT_SYMBOL(cdev_alloc); |
583 | EXPORT_SYMBOL(cdev_del); | 571 | EXPORT_SYMBOL(cdev_del); |
584 | EXPORT_SYMBOL(cdev_add); | 572 | EXPORT_SYMBOL(cdev_add); |
585 | EXPORT_SYMBOL(cdev_index); | ||
586 | EXPORT_SYMBOL(__register_chrdev); | 573 | EXPORT_SYMBOL(__register_chrdev); |
587 | EXPORT_SYMBOL(__unregister_chrdev); | 574 | EXPORT_SYMBOL(__unregister_chrdev); |
588 | EXPORT_SYMBOL(directly_mappable_cdev_bdi); | 575 | EXPORT_SYMBOL(directly_mappable_cdev_bdi); |