Commit 05469607 authored by Cornelia Huck's avatar Cornelia Huck Committed by Martin Schwidefsky

[S390] cio: Use to_channelpath() for device to channel path conversion.

We already have a macro for that, so let's use it consistently...
Signed-off-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent fae8b22d
...@@ -246,7 +246,7 @@ int chp_add_cmg_attr(struct channel_path *chp) ...@@ -246,7 +246,7 @@ int chp_add_cmg_attr(struct channel_path *chp)
static ssize_t chp_status_show(struct device *dev, static ssize_t chp_status_show(struct device *dev,
struct device_attribute *attr, char *buf) struct device_attribute *attr, char *buf)
{ {
struct channel_path *chp = container_of(dev, struct channel_path, dev); struct channel_path *chp = to_channelpath(dev);
if (!chp) if (!chp)
return 0; return 0;
...@@ -258,7 +258,7 @@ static ssize_t chp_status_write(struct device *dev, ...@@ -258,7 +258,7 @@ static ssize_t chp_status_write(struct device *dev,
struct device_attribute *attr, struct device_attribute *attr,
const char *buf, size_t count) const char *buf, size_t count)
{ {
struct channel_path *cp = container_of(dev, struct channel_path, dev); struct channel_path *cp = to_channelpath(dev);
char cmd[10]; char cmd[10];
int num_args; int num_args;
int error; int error;
...@@ -286,7 +286,7 @@ static ssize_t chp_configure_show(struct device *dev, ...@@ -286,7 +286,7 @@ static ssize_t chp_configure_show(struct device *dev,
struct channel_path *cp; struct channel_path *cp;
int status; int status;
cp = container_of(dev, struct channel_path, dev); cp = to_channelpath(dev);
status = chp_info_get_status(cp->chpid); status = chp_info_get_status(cp->chpid);
if (status < 0) if (status < 0)
return status; return status;
...@@ -308,7 +308,7 @@ static ssize_t chp_configure_write(struct device *dev, ...@@ -308,7 +308,7 @@ static ssize_t chp_configure_write(struct device *dev,
return -EINVAL; return -EINVAL;
if (val != 0 && val != 1) if (val != 0 && val != 1)
return -EINVAL; return -EINVAL;
cp = container_of(dev, struct channel_path, dev); cp = to_channelpath(dev);
chp_cfg_schedule(cp->chpid, val); chp_cfg_schedule(cp->chpid, val);
cfg_wait_idle(); cfg_wait_idle();
...@@ -320,7 +320,7 @@ static DEVICE_ATTR(configure, 0644, chp_configure_show, chp_configure_write); ...@@ -320,7 +320,7 @@ static DEVICE_ATTR(configure, 0644, chp_configure_show, chp_configure_write);
static ssize_t chp_type_show(struct device *dev, struct device_attribute *attr, static ssize_t chp_type_show(struct device *dev, struct device_attribute *attr,
char *buf) char *buf)
{ {
struct channel_path *chp = container_of(dev, struct channel_path, dev); struct channel_path *chp = to_channelpath(dev);
if (!chp) if (!chp)
return 0; return 0;
...@@ -374,7 +374,7 @@ static void chp_release(struct device *dev) ...@@ -374,7 +374,7 @@ static void chp_release(struct device *dev)
{ {
struct channel_path *cp; struct channel_path *cp;
cp = container_of(dev, struct channel_path, dev); cp = to_channelpath(dev);
kfree(cp); kfree(cp);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment