[PATCH] Fix compiler warning in driver core for CONFIG_HOTPLUG=N
FYI, while running a build test, I found: drivers/base/bus.c:166: warning: `driver_attr_unbind' defined but not used drivers/base/bus.c:194: warning: `driver_attr_bind' defined but not used Looks like these two attributes and supporting functions want to be #ifdef HOTPLUG'd Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
b365b3daf2
commit
e485981e52
1 changed files with 3 additions and 0 deletions
|
@ -133,6 +133,8 @@ static struct kobj_type ktype_bus = {
|
||||||
decl_subsys(bus, &ktype_bus, NULL);
|
decl_subsys(bus, &ktype_bus, NULL);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef CONFIG_HOTPLUG
|
||||||
|
|
||||||
/* Manually detach a device from its associated driver. */
|
/* Manually detach a device from its associated driver. */
|
||||||
static int driver_helper(struct device *dev, void *data)
|
static int driver_helper(struct device *dev, void *data)
|
||||||
{
|
{
|
||||||
|
@ -193,6 +195,7 @@ static ssize_t driver_bind(struct device_driver *drv,
|
||||||
}
|
}
|
||||||
static DRIVER_ATTR(bind, S_IWUSR, NULL, driver_bind);
|
static DRIVER_ATTR(bind, S_IWUSR, NULL, driver_bind);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct device * next_device(struct klist_iter * i)
|
static struct device * next_device(struct klist_iter * i)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue