X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fbase%2Fdriver.c;h=bf31a0170a486b08dd61827fa1baef4f58c8df7c;hb=cdd0972945dbcb8ea24db365d9b0e100af2a27bb;hp=a35f04121a00f938503f3b585c4e792e8a578d8f;hpb=bd45ac0c5daae35e7c71138172e63df5cf644cf6;p=linux-2.6-omap-h63xx.git diff --git a/drivers/base/driver.c b/drivers/base/driver.c index a35f04121a0..bf31a0170a4 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c @@ -97,10 +97,9 @@ int driver_create_file(struct device_driver *drv, struct driver_attribute *attr) { int error; - if (get_driver(drv)) { + if (drv) error = sysfs_create_file(&drv->p->kobj, &attr->attr); - put_driver(drv); - } else + else error = -EINVAL; return error; } @@ -114,15 +113,16 @@ EXPORT_SYMBOL_GPL(driver_create_file); void driver_remove_file(struct device_driver *drv, struct driver_attribute *attr) { - if (get_driver(drv)) { + if (drv) sysfs_remove_file(&drv->p->kobj, &attr->attr); - put_driver(drv); - } } EXPORT_SYMBOL_GPL(driver_remove_file); /** * driver_add_kobj - add a kobject below the specified driver + * @drv: requesting device driver + * @kobj: kobject to add below this driver + * @fmt: format string that names the kobject * * You really don't want to do this, this is only here due to one looney * iseries driver, go poke those developers if you are annoyed about