diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2007-10-22 06:52:40 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-10-22 06:52:47 -0400 |
commit | 054696077a6c4f9e306321d45b5762d6ea7940e1 (patch) | |
tree | 941c5759566cec16e932d33fbefd9fe41cf2be01 | |
parent | fae8b22d3e3e3a3d317a7746493997af02a3f35c (diff) |
[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: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | drivers/s390/cio/chp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/s390/cio/chp.c b/drivers/s390/cio/chp.c index 42c1f4659adb..297cdceb0ca4 100644 --- a/drivers/s390/cio/chp.c +++ b/drivers/s390/cio/chp.c | |||
@@ -246,7 +246,7 @@ int chp_add_cmg_attr(struct channel_path *chp) | |||
246 | static ssize_t chp_status_show(struct device *dev, | 246 | static ssize_t chp_status_show(struct device *dev, |
247 | struct device_attribute *attr, char *buf) | 247 | struct device_attribute *attr, char *buf) |
248 | { | 248 | { |
249 | struct channel_path *chp = container_of(dev, struct channel_path, dev); | 249 | struct channel_path *chp = to_channelpath(dev); |
250 | 250 | ||
251 | if (!chp) | 251 | if (!chp) |
252 | return 0; | 252 | return 0; |
@@ -258,7 +258,7 @@ static ssize_t chp_status_write(struct device *dev, | |||
258 | struct device_attribute *attr, | 258 | struct device_attribute *attr, |
259 | const char *buf, size_t count) | 259 | const char *buf, size_t count) |
260 | { | 260 | { |
261 | struct channel_path *cp = container_of(dev, struct channel_path, dev); | 261 | struct channel_path *cp = to_channelpath(dev); |
262 | char cmd[10]; | 262 | char cmd[10]; |
263 | int num_args; | 263 | int num_args; |
264 | int error; | 264 | int error; |
@@ -286,7 +286,7 @@ static ssize_t chp_configure_show(struct device *dev, | |||
286 | struct channel_path *cp; | 286 | struct channel_path *cp; |
287 | int status; | 287 | int status; |
288 | 288 | ||
289 | cp = container_of(dev, struct channel_path, dev); | 289 | cp = to_channelpath(dev); |
290 | status = chp_info_get_status(cp->chpid); | 290 | status = chp_info_get_status(cp->chpid); |
291 | if (status < 0) | 291 | if (status < 0) |
292 | return status; | 292 | return status; |
@@ -308,7 +308,7 @@ static ssize_t chp_configure_write(struct device *dev, | |||
308 | return -EINVAL; | 308 | return -EINVAL; |
309 | if (val != 0 && val != 1) | 309 | if (val != 0 && val != 1) |
310 | return -EINVAL; | 310 | return -EINVAL; |
311 | cp = container_of(dev, struct channel_path, dev); | 311 | cp = to_channelpath(dev); |
312 | chp_cfg_schedule(cp->chpid, val); | 312 | chp_cfg_schedule(cp->chpid, val); |
313 | cfg_wait_idle(); | 313 | cfg_wait_idle(); |
314 | 314 | ||
@@ -320,7 +320,7 @@ static DEVICE_ATTR(configure, 0644, chp_configure_show, chp_configure_write); | |||
320 | static ssize_t chp_type_show(struct device *dev, struct device_attribute *attr, | 320 | static ssize_t chp_type_show(struct device *dev, struct device_attribute *attr, |
321 | char *buf) | 321 | char *buf) |
322 | { | 322 | { |
323 | struct channel_path *chp = container_of(dev, struct channel_path, dev); | 323 | struct channel_path *chp = to_channelpath(dev); |
324 | 324 | ||
325 | if (!chp) | 325 | if (!chp) |
326 | return 0; | 326 | return 0; |
@@ -374,7 +374,7 @@ static void chp_release(struct device *dev) | |||
374 | { | 374 | { |
375 | struct channel_path *cp; | 375 | struct channel_path *cp; |
376 | 376 | ||
377 | cp = container_of(dev, struct channel_path, dev); | 377 | cp = to_channelpath(dev); |
378 | kfree(cp); | 378 | kfree(cp); |
379 | } | 379 | } |
380 | 380 | ||