* [lm-sensors] [PATCH] I2C: add kobj_to_i2c_client
@ 2005-09-05 23:48 Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2005-09-05 23:48 UTC (permalink / raw)
To: lm-sensors
[PATCH] I2C: add kobj_to_i2c_client
Move the inline function kobj_to_i2c_client() from max6875.c to i2c.h.
Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
commit a61fc683ae1b7871d8d81ac5025af1a923731547
tree 8b141faa2d84653075b6baea18e64e7302345cbd
parent 5033017c2678df9dc75be0139f19701ff224a498
author bgardner@wabtec.com <bgardner@wabtec.com> Wed, 27 Jul 2005 12:43:03 -0500
committer Greg Kroah-Hartman <gregkh@suse.de> Mon, 05 Sep 2005 09:14:05 -0700
drivers/i2c/chips/max6875.c | 5 -----
include/linux/i2c.h | 5 +++++
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/i2c/chips/max6875.c b/drivers/i2c/chips/max6875.c
--- a/drivers/i2c/chips/max6875.c
+++ b/drivers/i2c/chips/max6875.c
@@ -131,11 +131,6 @@ exit_up:
up(&data->update_lock);
}
-static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj)
-{
- return to_i2c_client(container_of(kobj, struct device, kobj));
-}
-
static ssize_t max6875_read(struct kobject *kobj, char *buf, loff_t off,
size_t count)
{
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -160,6 +160,11 @@ struct i2c_client {
};
#define to_i2c_client(d) container_of(d, struct i2c_client, dev)
+static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj)
+{
+ return to_i2c_client(container_of(kobj, struct device, kobj));
+}
+
static inline void *i2c_get_clientdata (struct i2c_client *dev)
{
return dev_get_drvdata (&dev->dev);
^ permalink raw reply [flat|nested] 2+ messages in thread* [lm-sensors] [PATCH] I2C: add kobj_to_i2c_client
@ 2005-07-27 19:44 bgardner
0 siblings, 0 replies; 2+ messages in thread
From: bgardner @ 2005-07-27 19:44 UTC (permalink / raw)
To: lm-sensors
Move the inline function kobj_to_i2c_client() from max6875.c to i2c.h.
Signed-off-by: Ben Gardner <bgardner@wabtec.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: i2c-kobj_to_i2c_client.diff
Type: text/x-diff
Size: 1256 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20050727/6ba77bb5/i2c-kobj_to_i2c_client.bin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-09-05 23:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-05 23:48 [lm-sensors] [PATCH] I2C: add kobj_to_i2c_client Greg KH
-- strict thread matches above, loose matches on Subject: below --
2005-07-27 19:44 bgardner
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.