mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-06 06:37:59 +00:00
Driver core: bus: remove indentation level
Before potentially fixing up these functions, this cosmetic change reduces the indentation level to make the code easier to read and maintain. No functional changes at all. Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
f70fa6296c
commit
d9fd4d3b31
1 changed files with 38 additions and 35 deletions
|
@ -518,7 +518,9 @@ int bus_add_driver(struct device_driver *drv)
|
|||
struct bus_type * bus = get_bus(drv->bus);
|
||||
int error = 0;
|
||||
|
||||
if (bus) {
|
||||
if (!bus)
|
||||
return 0;
|
||||
|
||||
pr_debug("bus %s: add driver %s\n", bus->name, drv->name);
|
||||
error = kobject_set_name(&drv->kobj, "%s", drv->name);
|
||||
if (error)
|
||||
|
@ -545,7 +547,7 @@ int bus_add_driver(struct device_driver *drv)
|
|||
printk(KERN_ERR "%s: add_bind_files(%s) failed\n",
|
||||
__FUNCTION__, drv->name);
|
||||
}
|
||||
}
|
||||
|
||||
return error;
|
||||
out_unregister:
|
||||
kobject_unregister(&drv->kobj);
|
||||
|
@ -565,7 +567,9 @@ out_put_bus:
|
|||
|
||||
void bus_remove_driver(struct device_driver * drv)
|
||||
{
|
||||
if (drv->bus) {
|
||||
if (!drv->bus)
|
||||
return;
|
||||
|
||||
remove_bind_files(drv);
|
||||
driver_remove_attrs(drv->bus, drv);
|
||||
klist_remove(&drv->knode_bus);
|
||||
|
@ -574,7 +578,6 @@ void bus_remove_driver(struct device_driver * drv)
|
|||
module_remove_driver(drv);
|
||||
kobject_unregister(&drv->kobj);
|
||||
put_bus(drv->bus);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue