diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2007-05-10 09:45:42 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-05-10 09:45:51 -0400 |
commit | 9a92fe48b92993bb3d20fd7021e22a1ab8a473df (patch) | |
tree | dcef91794632296444c2ea400aba128c94edb375 /drivers/s390/block/dasd_diag.c | |
parent | 0b0bb3c6bd66bd28062a71c2ca3878d31e2081ee (diff) |
[S390] cio: Get rid of _ccw_device_get_device_number().
The function shouldn't have existed in the first place (not MSS-aware).
Introduce a new function ccw_device_get_id() that extracts the
ccw_dev_id structure of a ccw device and convert all users of
_ccw_device_get_device_number to ccw_device_get_id.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd_diag.c')
-rw-r--r-- | drivers/s390/block/dasd_diag.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/s390/block/dasd_diag.c b/drivers/s390/block/dasd_diag.c index e810e4a44ed4..eccac1c3b71b 100644 --- a/drivers/s390/block/dasd_diag.c +++ b/drivers/s390/block/dasd_diag.c | |||
@@ -50,6 +50,7 @@ struct dasd_diag_private { | |||
50 | struct dasd_diag_rw_io iob; | 50 | struct dasd_diag_rw_io iob; |
51 | struct dasd_diag_init_io iib; | 51 | struct dasd_diag_init_io iib; |
52 | blocknum_t pt_block; | 52 | blocknum_t pt_block; |
53 | struct ccw_dev_id dev_id; | ||
53 | }; | 54 | }; |
54 | 55 | ||
55 | struct dasd_diag_req { | 56 | struct dasd_diag_req { |
@@ -102,7 +103,7 @@ mdsk_init_io(struct dasd_device *device, unsigned int blocksize, | |||
102 | iib = &private->iib; | 103 | iib = &private->iib; |
103 | memset(iib, 0, sizeof (struct dasd_diag_init_io)); | 104 | memset(iib, 0, sizeof (struct dasd_diag_init_io)); |
104 | 105 | ||
105 | iib->dev_nr = _ccw_device_get_device_number(device->cdev); | 106 | iib->dev_nr = private->dev_id.devno; |
106 | iib->block_size = blocksize; | 107 | iib->block_size = blocksize; |
107 | iib->offset = offset; | 108 | iib->offset = offset; |
108 | iib->flaga = DASD_DIAG_FLAGA_DEFAULT; | 109 | iib->flaga = DASD_DIAG_FLAGA_DEFAULT; |
@@ -127,7 +128,7 @@ mdsk_term_io(struct dasd_device * device) | |||
127 | private = (struct dasd_diag_private *) device->private; | 128 | private = (struct dasd_diag_private *) device->private; |
128 | iib = &private->iib; | 129 | iib = &private->iib; |
129 | memset(iib, 0, sizeof (struct dasd_diag_init_io)); | 130 | memset(iib, 0, sizeof (struct dasd_diag_init_io)); |
130 | iib->dev_nr = _ccw_device_get_device_number(device->cdev); | 131 | iib->dev_nr = private->dev_id.devno; |
131 | rc = dia250(iib, TERM_BIO); | 132 | rc = dia250(iib, TERM_BIO); |
132 | return rc; | 133 | return rc; |
133 | } | 134 | } |
@@ -166,7 +167,7 @@ dasd_start_diag(struct dasd_ccw_req * cqr) | |||
166 | private = (struct dasd_diag_private *) device->private; | 167 | private = (struct dasd_diag_private *) device->private; |
167 | dreq = (struct dasd_diag_req *) cqr->data; | 168 | dreq = (struct dasd_diag_req *) cqr->data; |
168 | 169 | ||
169 | private->iob.dev_nr = _ccw_device_get_device_number(device->cdev); | 170 | private->iob.dev_nr = private->dev_id.devno; |
170 | private->iob.key = 0; | 171 | private->iob.key = 0; |
171 | private->iob.flags = DASD_DIAG_RWFLAG_ASYNC; | 172 | private->iob.flags = DASD_DIAG_RWFLAG_ASYNC; |
172 | private->iob.block_count = dreq->block_count; | 173 | private->iob.block_count = dreq->block_count; |
@@ -323,11 +324,12 @@ dasd_diag_check_device(struct dasd_device *device) | |||
323 | "memory allocation failed for private data"); | 324 | "memory allocation failed for private data"); |
324 | return -ENOMEM; | 325 | return -ENOMEM; |
325 | } | 326 | } |
327 | ccw_device_get_id(device->cdev, &private->dev_id); | ||
326 | device->private = (void *) private; | 328 | device->private = (void *) private; |
327 | } | 329 | } |
328 | /* Read Device Characteristics */ | 330 | /* Read Device Characteristics */ |
329 | rdc_data = (void *) &(private->rdc_data); | 331 | rdc_data = (void *) &(private->rdc_data); |
330 | rdc_data->dev_nr = _ccw_device_get_device_number(device->cdev); | 332 | rdc_data->dev_nr = private->dev_id.devno; |
331 | rdc_data->rdc_len = sizeof (struct dasd_diag_characteristics); | 333 | rdc_data->rdc_len = sizeof (struct dasd_diag_characteristics); |
332 | 334 | ||
333 | rc = diag210((struct diag210 *) rdc_data); | 335 | rc = diag210((struct diag210 *) rdc_data); |