]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] fix class symlinks in sysfs
authorBill Nottingham <notting@redhat.com>
Thu, 22 Sep 2005 07:47:36 +0000 (00:47 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 22 Sep 2005 14:58:24 +0000 (07:58 -0700)
commite7839f82b4da0091859147db48f1cf8c6f9341a0
tree2a73926a882a883f82b1066d9e72fd0962d58237
parentabb337c94725ec9b4538290db3cc5dd182c442ce
[PATCH] fix class symlinks in sysfs

The class symlinks in sysfs don't properly handle changing device names.

To demonstrate, rename your network device from eth0 to eth1. Your
pci (or usb, or whatever) device will still have a 'net:eth0' link,
except now it points to /sys/class/net/eth1.

The attached patch makes sure the class symlink name changes when
the class device name changes. It isn't 100% correct, it should be
using sysfs_rename_link. Unfortunately, sysfs_rename_link doesn't exist.

Signed-off-by: Bill Nottingham <notting@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/base/class.c