w1: Use kobj_to_dev() API
PATCH v2 1/1 w1: Use kobj_to_dev() API
Use kobj_to_dev() instead of container_of()
Signed-off-by Wang Qing <[email protected]>
--- include/linux/w1.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/w1.h +1 -1
@@ -311,7 +311,7 @@ static inline struct w1_slave* dev_to_w1_slave(struct device *dev)static inline struct w1_slave *kobj_to_w1_slave (struct kobject *kobj) { - return dev_to_w1_slave(container_of(kobj, struct device, kobj)); +return dev_to_w1_slave (kobj_to_dev (kobj)); }static inline struct w1_master *dev_to_w1_master (struct device *dev)
Signature · 1 line
2.7.4