[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <11952582603203-git-send-email-timur@freescale.com>
Date: Fri, 16 Nov 2007 18:11:00 -0600
From: Timur Tabi <timur@...escale.com>
To: linux-kernel@...r.kernel.org, gregkh@...e.de
Cc: Timur Tabi <timur@...escale.com>
Subject: Add a private_data pointer to struct device_attribute
A private data pointer in struct device_attribute allows the 'show' and 'store'
functions to access instance data. This handy in situations where the
driver_data and platform_data pointers of 'struct device' are already used
for other purposes.
Signed-off-by: Timur Tabi <timur@...escale.com>
---
Greg, can you tell me if you think this patch is a good idea? It doesn't
appear to do any harm, and I'm working on an ALSA driver that could benefit
for this patch. I think 2.6.25 would be a good target.
include/linux/device.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/linux/device.h b/include/linux/device.h
index 2e15822..10708ee 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -344,6 +344,7 @@ struct device_attribute {
char *buf);
ssize_t (*store)(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count);
+ void *private_data;
};
#define DEVICE_ATTR(_name,_mode,_show,_store) \
--
1.5.2.4
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists