Commit 67eeb0b5 authored by Patrick Mochel's avatar Patrick Mochel

sysfs: reinstate count parameter for sysfs_ops.store() methods.

- Fixup bus, driver, and class methods.
parent ef43a6db
......@@ -43,14 +43,15 @@ drv_attr_show(struct kobject * kobj, struct attribute * attr, char * buf)
}
static ssize_t
drv_attr_store(struct kobject * kobj, struct attribute * attr, const char * buf)
drv_attr_store(struct kobject * kobj, struct attribute * attr,
const char * buf, size_t count)
{
struct driver_attribute * drv_attr = to_drv_attr(attr);
struct device_driver * drv = to_driver(kobj);
ssize_t ret = 0;
if (drv_attr->store)
ret = drv_attr->store(drv,buf);
ret = drv_attr->store(drv,buf,count);
return ret;
}
......@@ -90,14 +91,15 @@ bus_attr_show(struct kobject * kobj, struct attribute * attr, char * buf)
}
static ssize_t
bus_attr_store(struct kobject * kobj, struct attribute * attr, const char * buf)
bus_attr_store(struct kobject * kobj, struct attribute * attr,
const char * buf, size_t count)
{
struct bus_attribute * bus_attr = to_bus_attr(attr);
struct bus_type * bus = to_bus(kobj);
ssize_t ret = 0;
if (bus_attr->store)
ret = bus_attr->store(bus,buf);
ret = bus_attr->store(bus,buf,count);
return ret;
}
......
......@@ -26,14 +26,15 @@ devclass_attr_show(struct kobject * kobj, struct attribute * attr, char * buf)
}
static ssize_t
devclass_attr_store(struct kobject * kobj, struct attribute * attr, const char * buf)
devclass_attr_store(struct kobject * kobj, struct attribute * attr,
const char * buf, size_t count)
{
struct devclass_attribute * class_attr = to_class_attr(attr);
struct device_class * dc = to_class(kobj);
ssize_t ret = 0;
if (class_attr->store)
ret = class_attr->store(dc,buf);
ret = class_attr->store(dc,buf,count);
return ret;
}
......
......@@ -98,7 +98,7 @@ int bus_for_each_drv(struct bus_type * bus, struct device_driver * start,
struct bus_attribute {
struct attribute attr;
ssize_t (*show)(struct bus_type *, char * buf);
ssize_t (*store)(struct bus_type *, const char * buf);
ssize_t (*store)(struct bus_type *, const char * buf, size_t count);
};
#define BUS_ATTR(_name,_mode,_show,_store) \
......@@ -141,7 +141,7 @@ extern void put_driver(struct device_driver * drv);
struct driver_attribute {
struct attribute attr;
ssize_t (*show)(struct device_driver *, char * buf);
ssize_t (*store)(struct device_driver *, const char * buf);
ssize_t (*store)(struct device_driver *, const char * buf, size_t count);
};
#define DRIVER_ATTR(_name,_mode,_show,_store) \
......@@ -182,7 +182,7 @@ extern void put_devclass(struct device_class *);
struct devclass_attribute {
struct attribute attr;
ssize_t (*show)(struct device_class *, char * buf);
ssize_t (*store)(struct device_class *, const char * buf);
ssize_t (*store)(struct device_class *, const char * buf, size_t count);
};
#define DEVCLASS_ATTR(_name,_str,_mode,_show,_store) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment