s390/cio: use kobj_to_dev() API
Subsystems (2)
PATCH v2 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]>
Signed-off-by chenqiwu <[email protected]>
---
changes in v2:
- add signed off for my gmail adderss.
---
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 4 lines · On Fri, 14 Feb 2020 21:51:33 +0800 [email protected] wrote:
From: chenqiwu <[email protected]>
Use
kobj_to_dev()API instead ofcontainer_of().
Quoted 8 lines
Signed-off-by chenqiwu <[email protected]>Signed-off-by chenqiwu <[email protected]>---
changes in v2:
- add signed off for my gmail adderss.
---drivers/s390/cio/chp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by Cornelia Huck <[email protected]>
Quoted 38 lines · On Fri, Feb 14, 2020 at 09:51:33PM +0800, [email protected] wrote:
From: chenqiwu <[email protected]>
Use
kobj_to_dev()API instead ofcontainer_of().Signed-off-by chenqiwu <[email protected]>Signed-off-by chenqiwu <[email protected]>---
changes in v2:
- add signed off for my gmail adderss.
---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
Applied, thanks