Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fs/char_dev.c: remove unused cdev_index()

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

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Namhyung Kim and committed by
Linus Torvalds
e6d7202b ceff1a77

-15
-13
fs/char_dev.c
··· 417 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 420 void cd_forget(struct inode *inode) 433 421 { 434 422 spin_lock(&cdev_lock); ··· 570 582 EXPORT_SYMBOL(cdev_alloc); 571 583 EXPORT_SYMBOL(cdev_del); 572 584 EXPORT_SYMBOL(cdev_add); 573 - EXPORT_SYMBOL(cdev_index); 574 585 EXPORT_SYMBOL(__register_chrdev); 575 586 EXPORT_SYMBOL(__unregister_chrdev); 576 587 EXPORT_SYMBOL(directly_mappable_cdev_bdi);
-2
include/linux/cdev.h
··· 28 28 29 29 void cdev_del(struct cdev *); 30 30 31 - int cdev_index(struct inode *inode); 32 - 33 31 void cd_forget(struct inode *); 34 32 35 33 extern struct backing_dev_info directly_mappable_cdev_bdi;