Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  devtmpfs: unlock mutex in case of string allocation error
  Driver core: export platform_device_register_data as a GPL symbol
  driver core: Prevent reference to freed memory on error path
  Driver-core: Fix bogus 0 error return in device_add()
  Driver core: driver_attribute parameters can often be const*
  Driver core: bin_attribute parameters can often be const*
  Driver core: device_attribute parameters can often be const*
  Doc/stable rules: add new cherry-pick logic
  vfs: get_sb_single() - do not pass options twice
  devtmpfs: Convert dirlock to a mutex
This commit is contained in:
Linus Torvalds
2009-12-23 13:35:03 -08:00
12 changed files with 72 additions and 40 deletions

View File

@@ -166,9 +166,9 @@ struct driver_attribute driver_attr_##_name = \
__ATTR(_name, _mode, _show, _store)
extern int __must_check driver_create_file(struct device_driver *driver,
struct driver_attribute *attr);
const struct driver_attribute *attr);
extern void driver_remove_file(struct device_driver *driver,
struct driver_attribute *attr);
const struct driver_attribute *attr);
extern int __must_check driver_add_kobj(struct device_driver *drv,
struct kobject *kobj,
@@ -319,13 +319,13 @@ struct device_attribute {
struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
extern int __must_check device_create_file(struct device *device,
struct device_attribute *entry);
const struct device_attribute *entry);
extern void device_remove_file(struct device *dev,
struct device_attribute *attr);
const struct device_attribute *attr);
extern int __must_check device_create_bin_file(struct device *dev,
struct bin_attribute *attr);
const struct bin_attribute *attr);
extern void device_remove_bin_file(struct device *dev,
struct bin_attribute *attr);
const struct bin_attribute *attr);
extern int device_schedule_callback_owner(struct device *dev,
void (*func)(struct device *dev), struct module *owner);

View File

@@ -99,8 +99,9 @@ int __must_check sysfs_chmod_file(struct kobject *kobj, struct attribute *attr,
void sysfs_remove_file(struct kobject *kobj, const struct attribute *attr);
int __must_check sysfs_create_bin_file(struct kobject *kobj,
struct bin_attribute *attr);
void sysfs_remove_bin_file(struct kobject *kobj, struct bin_attribute *attr);
const struct bin_attribute *attr);
void sysfs_remove_bin_file(struct kobject *kobj,
const struct bin_attribute *attr);
int __must_check sysfs_create_link(struct kobject *kobj, struct kobject *target,
const char *name);
@@ -175,13 +176,13 @@ static inline void sysfs_remove_file(struct kobject *kobj,
}
static inline int sysfs_create_bin_file(struct kobject *kobj,
struct bin_attribute *attr)
const struct bin_attribute *attr)
{
return 0;
}
static inline void sysfs_remove_bin_file(struct kobject *kobj,
struct bin_attribute *attr)
const struct bin_attribute *attr)
{
}