s390/cio: use kobj_to_dev() API
Subsystems (2)
PATCH 1/1 s390/cio: use kobj_to_dev() API
From: chenqiwu <[email protected]>
Use kobj_to_dev() API instead of container_of().
Signed-off-by chenqiwu <[email protected]>
--- drivers/s390/cio/chp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/s390/cio/chp.c +2 -2
@@ -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);
Signature · 1 line
1.9.1
Quoted 5 lines · On Fri, 14 Feb 2020 20:45:57 +0800 [email protected] wrote:
From: chenqiwu <[email protected]>
Use
kobj_to_dev()API instead ofcontainer_of().Signed-off-by chenqiwu <[email protected]>
I think you should also include the s-o-b from your gmail address here?
Quoted 3 lines
--- drivers/s390/cio/chp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by Cornelia Huck <[email protected]>