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 | |
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')
-rw-r--r-- | drivers/s390/block/dasd_diag.c | 10 | ||||
-rw-r--r-- | drivers/s390/block/dasd_ioctl.c | 4 |
2 files changed, 9 insertions, 5 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); |
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c index 758cfb542865..672eb0a3dd0b 100644 --- a/drivers/s390/block/dasd_ioctl.c +++ b/drivers/s390/block/dasd_ioctl.c | |||
@@ -255,6 +255,7 @@ dasd_ioctl_information(struct dasd_device *device, | |||
255 | unsigned long flags; | 255 | unsigned long flags; |
256 | int rc; | 256 | int rc; |
257 | struct ccw_device *cdev; | 257 | struct ccw_device *cdev; |
258 | struct ccw_dev_id dev_id; | ||
258 | 259 | ||
259 | if (!device->discipline->fill_info) | 260 | if (!device->discipline->fill_info) |
260 | return -EINVAL; | 261 | return -EINVAL; |
@@ -270,8 +271,9 @@ dasd_ioctl_information(struct dasd_device *device, | |||
270 | } | 271 | } |
271 | 272 | ||
272 | cdev = device->cdev; | 273 | cdev = device->cdev; |
274 | ccw_device_get_id(cdev, &dev_id); | ||
273 | 275 | ||
274 | dasd_info->devno = _ccw_device_get_device_number(device->cdev); | 276 | dasd_info->devno = dev_id.devno; |
275 | dasd_info->schid = _ccw_device_get_subchannel_number(device->cdev); | 277 | dasd_info->schid = _ccw_device_get_subchannel_number(device->cdev); |
276 | dasd_info->cu_type = cdev->id.cu_type; | 278 | dasd_info->cu_type = cdev->id.cu_type; |
277 | dasd_info->cu_model = cdev->id.cu_model; | 279 | dasd_info->cu_model = cdev->id.cu_model; |