Skip to contentSkip to conversation

fs/char_dev.c: remove unused cdev_index()

PATCH New Namhyung Kim 1 participant 1 message Dec 23, 2010 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/char_dev.c: remove unused cdev_index()

The commit 66fa12c571d3 ("ieee1394: remove the old IEEE 1394 driver stack") eliminated the only-user of cdev_index(). So it can be removed too.

Cc Stefan Richter <[email protected]>
Cc Theodore Ts'o <[email protected]>
---
 fs/char_dev.c        |   13 -------------
 include/linux/cdev.h |    2 --
 2 files changed, 0 insertions(+), 15 deletions(-)
fs/char_dev.c +0 -13
index e5b9df993b93..6e99b9ddd4e9 100644
@@ -417,18 +417,6 @@ static int chrdev_open(struct inode *inode, struct file *filp)
 	return ret;
 }
 
-int cdev_index(struct inode *inode)
-{
-	int idx;
-	struct kobject *kobj;
-
-	kobj = kobj_lookup(cdev_map, inode->i_rdev, &idx);
-	if (!kobj)
-		return -1;
-	kobject_put(kobj);
-	return idx;
-}
-
 void cd_forget(struct inode *inode)
 {
 	spin_lock(&cdev_lock);
@@ -582,7 +570,6 @@ EXPORT_SYMBOL(cdev_init);
 EXPORT_SYMBOL(cdev_alloc);
 EXPORT_SYMBOL(cdev_del);
 EXPORT_SYMBOL(cdev_add);
-EXPORT_SYMBOL(cdev_index);
 EXPORT_SYMBOL(__register_chrdev);
 EXPORT_SYMBOL(__unregister_chrdev);
 EXPORT_SYMBOL(directly_mappable_cdev_bdi);
include/linux/cdev.h +0 -2
index f389e319a454..fb4591977b03 100644
@@ -28,8 +28,6 @@ int cdev_add(struct cdev *, dev_t, unsigned);
 
 void cdev_del(struct cdev *);
 
-int cdev_index(struct inode *inode);
-
 void cd_forget(struct inode *);
 
 extern struct backing_dev_info directly_mappable_cdev_bdi;
Signature · 1 line
1.7.3.4.600.g982838b0