diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2007-05-10 17:45:42 +0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-05-10 17:45:51 +0400 |
commit | 9a92fe48b92993bb3d20fd7021e22a1ab8a473df (patch) | |
tree | dcef91794632296444c2ea400aba128c94edb375 /drivers | |
parent | 0b0bb3c6bd66bd28062a71c2ca3878d31e2081ee (diff) | |
download | linux-9a92fe48b92993bb3d20fd7021e22a1ab8a473df.tar.xz |
[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')
-rw-r--r-- | drivers/s390/block/dasd_diag.c | 10 | ||||
-rw-r--r-- | drivers/s390/block/dasd_ioctl.c | 4 | ||||
-rw-r--r-- | drivers/s390/char/raw3270.c | 5 | ||||
-rw-r--r-- | drivers/s390/cio/device_ops.c | 11 |
4 files changed, 23 insertions, 7 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 { struct dasd_diag_rw_io iob; struct dasd_diag_init_io iib; blocknum_t pt_block; + struct ccw_dev_id dev_id; }; struct dasd_diag_req { @@ -102,7 +103,7 @@ mdsk_init_io(struct dasd_device *device, unsigned int blocksize, iib = &private->iib; memset(iib, 0, sizeof (struct dasd_diag_init_io)); - iib->dev_nr = _ccw_device_get_device_number(device->cdev); + iib->dev_nr = private->dev_id.devno; iib->block_size = blocksize; iib->offset = offset; iib->flaga = DASD_DIAG_FLAGA_DEFAULT; @@ -127,7 +128,7 @@ mdsk_term_io(struct dasd_device * device) private = (struct dasd_diag_private *) device->private; iib = &private->iib; memset(iib, 0, sizeof (struct dasd_diag_init_io)); - iib->dev_nr = _ccw_device_get_device_number(device->cdev); + iib->dev_nr = private->dev_id.devno; rc = dia250(iib, TERM_BIO); return rc; } @@ -166,7 +167,7 @@ dasd_start_diag(struct dasd_ccw_req * cqr) private = (struct dasd_diag_private *) device->private; dreq = (struct dasd_diag_req *) cqr->data; - private->iob.dev_nr = _ccw_device_get_device_number(device->cdev); + private->iob.dev_nr = private->dev_id.devno; private->iob.key = 0; private->iob.flags = DASD_DIAG_RWFLAG_ASYNC; private->iob.block_count = dreq->block_count; @@ -323,11 +324,12 @@ dasd_diag_check_device(struct dasd_device *device) "memory allocation failed for private data"); return -ENOMEM; } + ccw_device_get_id(device->cdev, &private->dev_id); device->private = (void *) private; } /* Read Device Characteristics */ rdc_data = (void *) &(private->rdc_data); - rdc_data->dev_nr = _ccw_device_get_device_number(device->cdev); + rdc_data->dev_nr = private->dev_id.devno; rdc_data->rdc_len = sizeof (struct dasd_diag_characteristics); 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, unsigned long flags; int rc; struct ccw_device *cdev; + struct ccw_dev_id dev_id; if (!device->discipline->fill_info) return -EINVAL; @@ -270,8 +271,9 @@ dasd_ioctl_information(struct dasd_device *device, } cdev = device->cdev; + ccw_device_get_id(cdev, &dev_id); - dasd_info->devno = _ccw_device_get_device_number(device->cdev); + dasd_info->devno = dev_id.devno; dasd_info->schid = _ccw_device_get_subchannel_number(device->cdev); dasd_info->cu_type = cdev->id.cu_type; dasd_info->cu_model = cdev->id.cu_model; diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c index 8facd14adb7c..f6ef90ee3e7d 100644 --- a/drivers/s390/char/raw3270.c +++ b/drivers/s390/char/raw3270.c @@ -589,9 +589,10 @@ static int __raw3270_size_device_vm(struct raw3270 *rp) { int rc, model; + struct ccw_dev_id dev_id; - raw3270_init_diag210.vrdcdvno = - _ccw_device_get_device_number(rp->cdev); + ccw_device_get_id(rp->cdev, &dev_id); + raw3270_init_diag210.vrdcdvno = dev_id.devno; raw3270_init_diag210.vrdclen = sizeof(struct diag210); rc = diag210(&raw3270_init_diag210); if (rc) diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c index 16f59fcb66b1..a5d263fb55ae 100644 --- a/drivers/s390/cio/device_ops.c +++ b/drivers/s390/cio/device_ops.c @@ -616,6 +616,17 @@ ccw_device_get_chp_desc(struct ccw_device *cdev, int chp_no) return chp_get_chp_desc(chpid); } +/** + * ccw_device_get_id - obtain a ccw device id + * @cdev: device to obtain the id for + * @dev_id: where to fill in the values + */ +void ccw_device_get_id(struct ccw_device *cdev, struct ccw_dev_id *dev_id) +{ + *dev_id = cdev->private->dev_id; +} +EXPORT_SYMBOL(ccw_device_get_id); + // FIXME: these have to go: int |