mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 22:16:43 +07:00
07e4a3e27f
This relocates the driver binding/unbinding code to drivers/base/dd.c. This is done for two reasons: One, it's not code related to the bus_type itself; it uses some from that, some from devices, and some from drivers. And Two, it will make it easier to do some of the upcoming lock removal on that code.. Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
21 lines
552 B
C
21 lines
552 B
C
extern int bus_add_device(struct device * dev);
|
|
extern void bus_remove_device(struct device * dev);
|
|
|
|
extern int bus_add_driver(struct device_driver *);
|
|
extern void bus_remove_driver(struct device_driver *);
|
|
|
|
extern void driver_detach(struct device_driver * drv);
|
|
|
|
static inline struct class_device *to_class_dev(struct kobject *obj)
|
|
{
|
|
return container_of(obj, struct class_device, kobj);
|
|
}
|
|
|
|
static inline
|
|
struct class_device_attribute *to_class_dev_attr(struct attribute *_attr)
|
|
{
|
|
return container_of(_attr, struct class_device_attribute, attr);
|
|
}
|
|
|
|
|