diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2014-05-07 07:27:21 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2014-05-20 02:58:53 -0400 |
commit | 2bf29df7460f4038f84ac5dea3cbe582d6d4af82 (patch) | |
tree | f3c8fc9a1199da5a2d0426cc509d145097c22894 /drivers/s390/cio | |
parent | 2e4006b34d06681ed95d55510d4450f29a13c417 (diff) |
s390/cio: fix multiple structure definitions
Fix multiple definitions of struct channel_path_desc by moving it
to asm/chpid.h . Also change ccw_device_get_chp_desc to use proper
types.
Reviewed-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r-- | drivers/s390/cio/chp.c | 2 | ||||
-rw-r--r-- | drivers/s390/cio/chp.h | 2 | ||||
-rw-r--r-- | drivers/s390/cio/chsc.h | 11 | ||||
-rw-r--r-- | drivers/s390/cio/device_ops.c | 13 |
4 files changed, 13 insertions, 15 deletions
diff --git a/drivers/s390/cio/chp.c b/drivers/s390/cio/chp.c index 6c440d4349d4..d497aa05a72f 100644 --- a/drivers/s390/cio/chp.c +++ b/drivers/s390/cio/chp.c | |||
@@ -509,7 +509,7 @@ out: | |||
509 | * On success return a newly allocated copy of the channel-path description | 509 | * On success return a newly allocated copy of the channel-path description |
510 | * data associated with the given channel-path ID. Return %NULL on error. | 510 | * data associated with the given channel-path ID. Return %NULL on error. |
511 | */ | 511 | */ |
512 | void *chp_get_chp_desc(struct chp_id chpid) | 512 | struct channel_path_desc *chp_get_chp_desc(struct chp_id chpid) |
513 | { | 513 | { |
514 | struct channel_path *chp; | 514 | struct channel_path *chp; |
515 | struct channel_path_desc *desc; | 515 | struct channel_path_desc *desc; |
diff --git a/drivers/s390/cio/chp.h b/drivers/s390/cio/chp.h index 9284b785a06f..4efd5b867cc3 100644 --- a/drivers/s390/cio/chp.h +++ b/drivers/s390/cio/chp.h | |||
@@ -60,7 +60,7 @@ static inline struct channel_path *chpid_to_chp(struct chp_id chpid) | |||
60 | int chp_get_status(struct chp_id chpid); | 60 | int chp_get_status(struct chp_id chpid); |
61 | u8 chp_get_sch_opm(struct subchannel *sch); | 61 | u8 chp_get_sch_opm(struct subchannel *sch); |
62 | int chp_is_registered(struct chp_id chpid); | 62 | int chp_is_registered(struct chp_id chpid); |
63 | void *chp_get_chp_desc(struct chp_id chpid); | 63 | struct channel_path_desc *chp_get_chp_desc(struct chp_id chpid); |
64 | void chp_remove_cmg_attr(struct channel_path *chp); | 64 | void chp_remove_cmg_attr(struct channel_path *chp); |
65 | int chp_add_cmg_attr(struct channel_path *chp); | 65 | int chp_add_cmg_attr(struct channel_path *chp); |
66 | int chp_update_desc(struct channel_path *chp); | 66 | int chp_update_desc(struct channel_path *chp); |
diff --git a/drivers/s390/cio/chsc.h b/drivers/s390/cio/chsc.h index 7e53a9c8b0b9..76c9b50700b2 100644 --- a/drivers/s390/cio/chsc.h +++ b/drivers/s390/cio/chsc.h | |||
@@ -21,17 +21,6 @@ struct cmg_entry { | |||
21 | u32 values[NR_MEASUREMENT_ENTRIES]; | 21 | u32 values[NR_MEASUREMENT_ENTRIES]; |
22 | } __attribute__ ((packed)); | 22 | } __attribute__ ((packed)); |
23 | 23 | ||
24 | struct channel_path_desc { | ||
25 | u8 flags; | ||
26 | u8 lsn; | ||
27 | u8 desc; | ||
28 | u8 chpid; | ||
29 | u8 swla; | ||
30 | u8 zeroes; | ||
31 | u8 chla; | ||
32 | u8 chpp; | ||
33 | } __attribute__ ((packed)); | ||
34 | |||
35 | struct channel_path_desc_fmt1 { | 24 | struct channel_path_desc_fmt1 { |
36 | u8 flags; | 25 | u8 flags; |
37 | u8 lsn; | 26 | u8 lsn; |
diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c index 4845d64f2842..f3c417943dad 100644 --- a/drivers/s390/cio/device_ops.c +++ b/drivers/s390/cio/device_ops.c | |||
@@ -563,14 +563,23 @@ out_unlock: | |||
563 | return rc; | 563 | return rc; |
564 | } | 564 | } |
565 | 565 | ||
566 | void *ccw_device_get_chp_desc(struct ccw_device *cdev, int chp_no) | 566 | /** |
567 | * chp_get_chp_desc - return newly allocated channel-path descriptor | ||
568 | * @cdev: device to obtain the descriptor for | ||
569 | * @chp_idx: index of the channel path | ||
570 | * | ||
571 | * On success return a newly allocated copy of the channel-path description | ||
572 | * data associated with the given channel path. Return %NULL on error. | ||
573 | */ | ||
574 | struct channel_path_desc *ccw_device_get_chp_desc(struct ccw_device *cdev, | ||
575 | int chp_idx) | ||
567 | { | 576 | { |
568 | struct subchannel *sch; | 577 | struct subchannel *sch; |
569 | struct chp_id chpid; | 578 | struct chp_id chpid; |
570 | 579 | ||
571 | sch = to_subchannel(cdev->dev.parent); | 580 | sch = to_subchannel(cdev->dev.parent); |
572 | chp_id_init(&chpid); | 581 | chp_id_init(&chpid); |
573 | chpid.id = sch->schib.pmcw.chpid[chp_no]; | 582 | chpid.id = sch->schib.pmcw.chpid[chp_idx]; |
574 | return chp_get_chp_desc(chpid); | 583 | return chp_get_chp_desc(chpid); |
575 | } | 584 | } |
576 | 585 | ||