- Fixup bus, driver, and class methods.
}
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;
}
}
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;
}
}
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;
}
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) \
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) \
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) \