]> git.neil.brown.name Git - history.git/commitdiff
sysfs: reinstate count parameter for sysfs_ops.store() methods.
authorPatrick Mochel <mochel@osdl.org>
Mon, 13 Jan 2003 04:34:13 +0000 (22:34 -0600)
committerPatrick Mochel <mochel@osdl.org>
Mon, 13 Jan 2003 04:34:13 +0000 (22:34 -0600)
- Fixup bus, driver, and class methods.

drivers/base/bus.c
drivers/base/class.c
include/linux/device.h

index e682965bb06275f6fe260103d98a6afedef5ff41..39f7ceb1d04365f214b027a0202eb1ecf84e7dc3 100644 (file)
@@ -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;
 }
 
index 3bf2636553c04a44874463801744cad6ad9c660f..52c42ad287bb3b3bfee577e72a9a2cbeb76c5c1e 100644 (file)
@@ -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;
 }
 
index 7c4bc77b695d21dee6d3f88616875d33776691e9..17536217d0c24c180085e77c57ea6cfb38d24dac 100644 (file)
@@ -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)   \