/* The default show function that must be passed to sysfs. This will be called by sysfs for whenever a show function is called by the user on a sysfs file associated with the kobjects we have registered. We need to transpose back from a "default" kobject to our custom struct  */
static ssize_t foo_attr_show(struct kobject *kobj, struct attribute *attr, char *buf)
/* The default show function that must be passed to sysfs. This will be called by sysfs for whenever a show function is called by the user on a sysfs file associated with the kobjects we have registered. We need to transpose back from a "default" kobject to our custom struct  */
static ssize_t foo_attr_show(struct kobject *kobj, struct attribute *attr, char *buf)
{
	struct foo_attribute *attribute;
	struct foo_obj *foo;
	attribute = to_foo_attr(attr);
	foo = to_foo_obj(kobj);
	if (!attribute->show)
		return -EIO;
	return attribute->show(foo, attribute, buf);
}