Skip to content

Commit

Permalink
s390/cio: use kobj_to_dev() API
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
chenqiwu authored and Vasily Gorbik committed Feb 17, 2020
1 parent b16c372 commit 0d730b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/s390/cio/chp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 0d730b5

Please sign in to comment.