diff options
author | chenqiwu <chenqiwu@xiaomi.com> | 2020-02-14 16:51:33 +0300 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2020-02-17 20:01:57 +0300 |
commit | 0d730b57b95f7e703bb5789de91a7ece6d3a68ac (patch) | |
tree | f0256c80df69a6ed51c2d1e4077cad9c9ac3bea8 /drivers/s390 | |
parent | b16c3724dd717a354d0f0257fd647ef5518982aa (diff) | |
download | linux-0d730b57b95f7e703bb5789de91a7ece6d3a68ac.tar.xz |
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>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/cio/chp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/s390/cio/chp.c b/drivers/s390/cio/chp.c index 51038ec309c1..dfcbe54591fb 100644 --- a/drivers/s390/cio/chp.c +++ b/drivers/s390/cio/chp.c @@ -135,7 +135,7 @@ static ssize_t chp_measurement_chars_read(struct file *filp, struct channel_path *chp; struct device *device; - device = container_of(kobj, struct device, kobj); + device = kobj_to_dev(kobj); chp = to_channelpath(device); if (chp->cmg == -1) return 0; @@ -184,7 +184,7 @@ static ssize_t chp_measurement_read(struct file *filp, struct kobject *kobj, struct device *device; unsigned int size; - device = container_of(kobj, struct device, kobj); + device = kobj_to_dev(kobj); chp = to_channelpath(device); css = to_css(chp->dev.parent); |