aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2014-05-07 07:27:21 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2014-05-20 02:58:53 -0400
commit2bf29df7460f4038f84ac5dea3cbe582d6d4af82 (patch)
treef3c8fc9a1199da5a2d0426cc509d145097c22894 /drivers/s390/cio
parent2e4006b34d06681ed95d55510d4450f29a13c417 (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.c2
-rw-r--r--drivers/s390/cio/chp.h2
-rw-r--r--drivers/s390/cio/chsc.h11
-rw-r--r--drivers/s390/cio/device_ops.c13
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 */
512void *chp_get_chp_desc(struct chp_id chpid) 512struct 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)
60int chp_get_status(struct chp_id chpid); 60int chp_get_status(struct chp_id chpid);
61u8 chp_get_sch_opm(struct subchannel *sch); 61u8 chp_get_sch_opm(struct subchannel *sch);
62int chp_is_registered(struct chp_id chpid); 62int chp_is_registered(struct chp_id chpid);
63void *chp_get_chp_desc(struct chp_id chpid); 63struct channel_path_desc *chp_get_chp_desc(struct chp_id chpid);
64void chp_remove_cmg_attr(struct channel_path *chp); 64void chp_remove_cmg_attr(struct channel_path *chp);
65int chp_add_cmg_attr(struct channel_path *chp); 65int chp_add_cmg_attr(struct channel_path *chp);
66int chp_update_desc(struct channel_path *chp); 66int 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
24struct 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
35struct channel_path_desc_fmt1 { 24struct 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
566void *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 */
574struct 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