Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/cio: use kobj_to_dev() API

Use kobj_to_dev() API instead of container_of().

Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: chenqiwu <chenqiwu@xiaomi.com>
Signed-off-by: chenqiwu <qiwuchen55@gmail.com>
Message-Id: <1581688293-17283-1-git-send-email-qiwuchen55@gmail.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>

authored by

chenqiwu and committed by
Vasily Gorbik
0d730b57 b16c3724

+2 -2
+2 -2
drivers/s390/cio/chp.c
··· 135 135 struct channel_path *chp; 136 136 struct device *device; 137 137 138 - device = container_of(kobj, struct device, kobj); 138 + device = kobj_to_dev(kobj); 139 139 chp = to_channelpath(device); 140 140 if (chp->cmg == -1) 141 141 return 0; ··· 184 184 struct device *device; 185 185 unsigned int size; 186 186 187 - device = container_of(kobj, struct device, kobj); 187 + device = kobj_to_dev(kobj); 188 188 chp = to_channelpath(device); 189 189 css = to_css(chp->dev.parent); 190 190