* [PATCH 2.6.12-rc4 2/15] drivers/base/core.c, include/linux/device.h: change device_attribute callbacks
@ 2005-05-19 6:25 ` Yani Ioannou
0 siblings, 0 replies; 2+ messages in thread
From: Yani Ioannou @ 2005-05-17 10:39 UTC (permalink / raw)
To: Greg KH, linux-kernel, lm-sensors
[-- Attachment #1: Type: text/plain, Size: 250 bytes --]
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 <yani.ioannou@gmail.com>
---
[-- Attachment #2: patch-linux-2.6.12-rc4-sysfsdyncallback-deviceattr.diff.diffstat.txt --]
[-- Type: text/plain, Size: 124 bytes --]
drivers/base/core.c | 4 ++--
include/linux/device.h | 5 +++--
2 files changed, 5 insertions(+), 4 deletions(-)
[-- Attachment #3: patch-linux-2.6.12-rc4-sysfsdyncallback-deviceattr.diff --]
[-- Type: text/x-patch, Size: 1533 bytes --]
diff -uprN -X dontdiff linux-2.6.12-rc4/drivers/base/core.c linux-2.6.12-rc4-sysfsdyncallback-deviceattr/drivers/base/core.c
--- linux-2.6.12-rc4/drivers/base/core.c 2005-05-07 03:37:15.000000000 -0400
+++ linux-2.6.12-rc4-sysfsdyncallback-deviceattr/drivers/base/core.c 2005-05-16 20:50:02.000000000 -0400
@@ -41,7 +41,7 @@ dev_attr_show(struct kobject * kobj, str
ssize_t ret = 0;
if (dev_attr->show)
- ret = dev_attr->show(dev, buf);
+ ret = dev_attr->show(dev, dev_attr, buf);
return ret;
}
@@ -54,7 +54,7 @@ dev_attr_store(struct kobject * kobj, st
ssize_t ret = 0;
if (dev_attr->store)
- ret = dev_attr->store(dev, buf, count);
+ ret = dev_attr->store(dev, dev_attr, buf, count);
return ret;
}
diff -uprN -X dontdiff linux-2.6.12-rc4/include/linux/device.h linux-2.6.12-rc4-sysfsdyncallback-deviceattr/include/linux/device.h
--- linux-2.6.12-rc4/include/linux/device.h 2005-05-07 03:37:24.000000000 -0400
+++ linux-2.6.12-rc4-sysfsdyncallback-deviceattr/include/linux/device.h 2005-05-16 20:58:43.000000000 -0400
@@ -335,8 +335,9 @@ extern void driver_attach(struct device_
struct device_attribute {
struct attribute attr;
- ssize_t (*show)(struct device * dev, char * buf);
- ssize_t (*store)(struct device * dev, const char * buf, size_t count);
+ ssize_t (*show)(struct device * dev, struct device_attribute *attr, char * buf);
+ ssize_t (*store)(struct device * dev, struct device_attribute *attr,
+ const char * buf, size_t count);
};
#define DEVICE_ATTR(_name,_mode,_show,_store) \
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-05-19 6:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-17 10:39 [PATCH 2.6.12-rc4 2/15] drivers/base/core.c, include/linux/device.h: change device_attribute callbacks Yani Ioannou
2005-05-19 6:25 ` [lm-sensors] [PATCH 2.6.12-rc4 2/15] drivers/base/core.c, Yani Ioannou
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.