mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
[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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
5033017c26
commit
a61fc683ae
2 changed files with 5 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue