/* Just like the default show function above, but this one is for when the sysfs "store" is requested (when a value is written to a file.)  */
static ssize_t foo_attr_store(struct kobject *kobj, struct attribute *attr, const char *buf, size_t len)
/* Just like the default show function above, but this one is for when the sysfs "store" is requested (when a value is written to a file.)  */
static ssize_t foo_attr_store(struct kobject *kobj, struct attribute *attr, const char *buf, size_t len)
{
	struct foo_attribute *attribute;
	struct foo_obj *foo;
	attribute = to_foo_attr(attr);
	foo = to_foo_obj(kobj);
	if (!attribute->store)
		return -EIO;
	return attribute->store(foo, attribute, buf, len);
}