mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
[PATCH] Driver core: change device_attribute callbacks
This patch adds the device_attribute paramerter to the device_attribute store and show sysfs callback functions, and passes a reference to the attribute when the callbacks are called. Signed-off-by: Yani Ioannou <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
ca2b94ba12
commit
54b6f35c99
2 changed files with 6 additions and 4 deletions
|
|
@ -39,7 +39,7 @@ dev_attr_show(struct kobject * kobj, struct attribute * attr, char * buf)
|
|||
ssize_t ret = -EIO;
|
||||
|
||||
if (dev_attr->show)
|
||||
ret = dev_attr->show(dev, buf);
|
||||
ret = dev_attr->show(dev, dev_attr, buf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ dev_attr_store(struct kobject * kobj, struct attribute * attr,
|
|||
ssize_t ret = -EIO;
|
||||
|
||||
if (dev_attr->store)
|
||||
ret = dev_attr->store(dev, buf, count);
|
||||
ret = dev_attr->store(dev, dev_attr, buf, count);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue