diff options
| -rw-r--r-- | drivers/base/bus.c | 10 | ||||
| -rw-r--r-- | drivers/base/class.c | 5 | ||||
| -rw-r--r-- | include/linux/device.h | 6 |
3 files changed, 12 insertions, 9 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index e682965bb062..39f7ceb1d043 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -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; } diff --git a/drivers/base/class.c b/drivers/base/class.c index 3bf2636553c0..52c42ad287bb 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c @@ -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; } diff --git a/include/linux/device.h b/include/linux/device.h index 7c4bc77b695d..17536217d0c2 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -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) \ |
