projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4651f1
)
i2c: Switch to using the new API kobj_to_dev()
author
Tian Tao
<tiantao6@hisilicon.com>
Tue, 15 Sep 2020 01:38:18 +0000
(09:38 +0800)
committer
Wolfram Sang
<wsa@kernel.org>
Mon, 21 Sep 2020 09:45:43 +0000
(11:45 +0200)
Switch to using the new API kobj_to_dev().
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
include/linux/i2c.h
patch
|
blob
|
history
diff --git
a/include/linux/i2c.h
b/include/linux/i2c.h
index
fc55ea4
..
5662265
100644
(file)
--- a/
include/linux/i2c.h
+++ b/
include/linux/i2c.h
@@
-344,7
+344,7
@@
const struct i2c_device_id *i2c_match_id(const struct i2c_device_id *id,
static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj)
{
- struct device * const dev =
container_of(kobj, struct device,
kobj);
+ struct device * const dev =
kobj_to_dev(
kobj);
return to_i2c_client(dev);
}