diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-12-24 07:16:02 +0100 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-12-24 07:16:02 +0100 |
commit | f34548cb735b7a80bbbb0bdd09ad4c2173ba92d5 (patch) | |
tree | e53c9e39b3149221779c10595bc59fa02de4f45f /drivers/base/core.c | |
parent | sh: Ensure all PG_dcache_dirty pages are written back. (diff) | |
parent | serial: sh-sci: Convert tremaining ctrl_xxx I/O routines to __raw_xxx. (diff) | |
download | linux-f34548cb735b7a80bbbb0bdd09ad4c2173ba92d5.tar.xz linux-f34548cb735b7a80bbbb0bdd09ad4c2173ba92d5.zip |
Merge branch 'sh/g3-prep' into sh/for-2.6.33
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r-- | drivers/base/core.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index f1290cbd1350..282025770429 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -446,7 +446,8 @@ struct kset *devices_kset; * @dev: device. * @attr: device attribute descriptor. */ -int device_create_file(struct device *dev, struct device_attribute *attr) +int device_create_file(struct device *dev, + const struct device_attribute *attr) { int error = 0; if (dev) @@ -459,7 +460,8 @@ int device_create_file(struct device *dev, struct device_attribute *attr) * @dev: device. * @attr: device attribute descriptor. */ -void device_remove_file(struct device *dev, struct device_attribute *attr) +void device_remove_file(struct device *dev, + const struct device_attribute *attr) { if (dev) sysfs_remove_file(&dev->kobj, &attr->attr); @@ -470,7 +472,8 @@ void device_remove_file(struct device *dev, struct device_attribute *attr) * @dev: device. * @attr: device binary attribute descriptor. */ -int device_create_bin_file(struct device *dev, struct bin_attribute *attr) +int device_create_bin_file(struct device *dev, + const struct bin_attribute *attr) { int error = -EINVAL; if (dev) @@ -484,7 +487,8 @@ EXPORT_SYMBOL_GPL(device_create_bin_file); * @dev: device. * @attr: device binary attribute descriptor. */ -void device_remove_bin_file(struct device *dev, struct bin_attribute *attr) +void device_remove_bin_file(struct device *dev, + const struct bin_attribute *attr) { if (dev) sysfs_remove_bin_file(&dev->kobj, attr); @@ -905,8 +909,10 @@ int device_add(struct device *dev) dev->init_name = NULL; } - if (!dev_name(dev)) + if (!dev_name(dev)) { + error = -EINVAL; goto name_error; + } pr_debug("device: '%s': %s\n", dev_name(dev), __func__); |