summaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/chp.h
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2016-11-08 14:28:03 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2017-01-16 07:27:52 +0100
commit98cc43ab6bc9574ec4dbc61acccfdcbbfa34d4c5 (patch)
tree044e735a994ac3464d1508f1e507bfcc4e52b693 /drivers/s390/cio/chp.h
parent57c52ae75774c717eb7cd777b5438244ae6b380c (diff)
downloadop-kernel-dev-98cc43ab6bc9574ec4dbc61acccfdcbbfa34d4c5.zip
op-kernel-dev-98cc43ab6bc9574ec4dbc61acccfdcbbfa34d4c5.tar.gz
s390/cio: clarify cssid usage
Currently the cssid in various structures is used as the id of the respective channel subsystem. Sometimes however we call the index in the channel_subsystems array cssid. In some places the id is even used as the index. Provide a new define MAX_CSS_IDX and use it where appropriate. In addition to that provide a dummy function to find a channel subsystem by its id and a macro to iterate over the channel subsystems. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Reviewed-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/chp.h')
-rw-r--r--drivers/s390/cio/chp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/cio/chp.h b/drivers/s390/cio/chp.h
index bb5a682..0d8437b 100644
--- a/drivers/s390/cio/chp.h
+++ b/drivers/s390/cio/chp.h
@@ -54,7 +54,7 @@ struct channel_path {
/* Return channel_path struct for given chpid. */
static inline struct channel_path *chpid_to_chp(struct chp_id chpid)
{
- return channel_subsystems[chpid.cssid]->chps[chpid.id];
+ return css_by_id(chpid.cssid)->chps[chpid.id];
}
int chp_get_status(struct chp_id chpid);
OpenPOWER on IntegriCloud