driver core: remove CONFIG_SYSFS_DEPRECATED_V2 but keep it for block devices
This patch removes the old CONFIG_SYSFS_DEPRECATED_V2 config option, but it keeps the logic around to handle block devices in the old manner as some people like to run new kernel versions on old (pre 2007/2008) distros. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Cc: Jens Axboe <axboe@kernel.dk> Cc: Stephen Hemminger <shemminger@vyatta.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: "James E.J. Bottomley" <James.Bottomley@suse.de> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Cc: Randy Dunlap <randy.dunlap@oracle.com> Cc: Tejun Heo <tj@kernel.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
807508c8ff
commit
39aba963d9
@@ -440,22 +440,6 @@ static void device_remove_attrs(struct bus_type *bus, struct device *dev)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SYSFS_DEPRECATED
|
||||
static int make_deprecated_bus_links(struct device *dev)
|
||||
{
|
||||
return sysfs_create_link(&dev->kobj,
|
||||
&dev->bus->p->subsys.kobj, "bus");
|
||||
}
|
||||
|
||||
static void remove_deprecated_bus_links(struct device *dev)
|
||||
{
|
||||
sysfs_remove_link(&dev->kobj, "bus");
|
||||
}
|
||||
#else
|
||||
static inline int make_deprecated_bus_links(struct device *dev) { return 0; }
|
||||
static inline void remove_deprecated_bus_links(struct device *dev) { }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* bus_add_device - add device to bus
|
||||
* @dev: device being added
|
||||
@@ -482,15 +466,10 @@ int bus_add_device(struct device *dev)
|
||||
&dev->bus->p->subsys.kobj, "subsystem");
|
||||
if (error)
|
||||
goto out_subsys;
|
||||
error = make_deprecated_bus_links(dev);
|
||||
if (error)
|
||||
goto out_deprecated;
|
||||
klist_add_tail(&dev->p->knode_bus, &bus->p->klist_devices);
|
||||
}
|
||||
return 0;
|
||||
|
||||
out_deprecated:
|
||||
sysfs_remove_link(&dev->kobj, "subsystem");
|
||||
out_subsys:
|
||||
sysfs_remove_link(&bus->p->devices_kset->kobj, dev_name(dev));
|
||||
out_id:
|
||||
@@ -530,7 +509,6 @@ void bus_remove_device(struct device *dev)
|
||||
{
|
||||
if (dev->bus) {
|
||||
sysfs_remove_link(&dev->kobj, "subsystem");
|
||||
remove_deprecated_bus_links(dev);
|
||||
sysfs_remove_link(&dev->bus->p->devices_kset->kobj,
|
||||
dev_name(dev));
|
||||
device_remove_attrs(dev->bus, dev);
|
||||
|
Reference in New Issue
Block a user