s390: use ccw_device_get_schid
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Mon, 29 Oct 2012 15:50:20 +0000 (16:50 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 23 Nov 2012 10:14:28 +0000 (11:14 +0100)
Let the dasd driver and qdio use ccw_device_get_schid and
get rid of other similar functions.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/ccwdev.h
drivers/s390/block/dasd_ioctl.c
drivers/s390/cio/device.c
drivers/s390/cio/device.h
drivers/s390/cio/device_ops.c
drivers/s390/cio/qdio_setup.c

index 9ad79f7f1accc57d8a96c90b3bde52eecad2d844..6d1f3573f0df020cd6f23904357f3ccedf2ecc0e 100644 (file)
@@ -226,9 +226,6 @@ extern int ccw_device_force_console(void);
 
 int ccw_device_siosl(struct ccw_device *);
 
-// FIXME: these have to go
-extern int _ccw_device_get_subchannel_number(struct ccw_device *);
-
 extern void ccw_device_get_schid(struct ccw_device *, struct subchannel_id *);
 
 extern void *ccw_device_get_chp_desc(struct ccw_device *, int);
index 8252f37d04ed317b3f39764089187e0c91779c29..03c0e044455335df0c6d3a0cc5defbf5c15dd0a6 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/slab.h>
 #include <asm/compat.h>
 #include <asm/ccwdev.h>
+#include <asm/schid.h>
 #include <asm/cmb.h>
 #include <asm/uaccess.h>
 
@@ -308,11 +309,12 @@ static int dasd_ioctl_information(struct dasd_block *block,
                                  unsigned int cmd, void __user *argp)
 {
        struct dasd_information2_t *dasd_info;
-       unsigned long flags;
-       int rc;
+       struct subchannel_id sch_id;
+       struct ccw_dev_id dev_id;
        struct dasd_device *base;
        struct ccw_device *cdev;
-       struct ccw_dev_id dev_id;
+       unsigned long flags;
+       int rc;
 
        base = block->base;
        if (!base->discipline || !base->discipline->fill_info)
@@ -330,9 +332,10 @@ static int dasd_ioctl_information(struct dasd_block *block,
 
        cdev = base->cdev;
        ccw_device_get_id(cdev, &dev_id);
+       ccw_device_get_schid(cdev, &sch_id);
 
        dasd_info->devno = dev_id.devno;
-       dasd_info->schid = _ccw_device_get_subchannel_number(base->cdev);
+       dasd_info->schid = sch_id.sch_no;
        dasd_info->cu_type = cdev->id.cu_type;
        dasd_info->cu_model = cdev->id.cu_model;
        dasd_info->dev_type = cdev->id.dev_type;
index fd3143c291c6a630933d608c6c6e455b2be04a0d..6995cff44636a23dfe857098c2faca86670311fe 100644 (file)
@@ -2036,16 +2036,6 @@ void ccw_driver_unregister(struct ccw_driver *cdriver)
        driver_unregister(&cdriver->driver);
 }
 
-/* Helper func for qdio. */
-struct subchannel_id
-ccw_device_get_subchannel_id(struct ccw_device *cdev)
-{
-       struct subchannel *sch;
-
-       sch = to_subchannel(cdev->dev.parent);
-       return sch->schid;
-}
-
 static void ccw_device_todo(struct work_struct *work)
 {
        struct ccw_device_private *priv;
@@ -2138,4 +2128,3 @@ EXPORT_SYMBOL(ccw_device_set_offline);
 EXPORT_SYMBOL(ccw_driver_register);
 EXPORT_SYMBOL(ccw_driver_unregister);
 EXPORT_SYMBOL(get_ccwdev_by_busid);
-EXPORT_SYMBOL_GPL(ccw_device_get_subchannel_id);
index 6bace694239614dfb2d948ba6741c25de052ff73..2e575cff984549bbc90478663d6fcf3a23b10410 100644 (file)
@@ -142,9 +142,7 @@ int ccw_device_notify(struct ccw_device *, int);
 void ccw_device_set_disconnected(struct ccw_device *cdev);
 void ccw_device_set_notoper(struct ccw_device *cdev);
 
-/* qdio needs this. */
 void ccw_device_set_timeout(struct ccw_device *, int);
-extern struct subchannel_id ccw_device_get_subchannel_id(struct ccw_device *);
 
 /* Channel measurement facility related */
 void retry_set_schib(struct ccw_device *cdev);
index 2ad832f8e340f56f78bd41b1ead3fa8d9f5ca435..c77b6e06bf646a90ad01d6e33a61bc5411ecf884 100644 (file)
@@ -755,14 +755,6 @@ int ccw_device_tm_intrg(struct ccw_device *cdev)
 }
 EXPORT_SYMBOL(ccw_device_tm_intrg);
 
-// FIXME: these have to go:
-
-int
-_ccw_device_get_subchannel_number(struct ccw_device *cdev)
-{
-       return cdev->private->schid.sch_no;
-}
-
 /**
  * ccw_device_get_schid - obtain a subchannel id
  * @cdev: device to obtain the id for
@@ -789,5 +781,4 @@ EXPORT_SYMBOL(ccw_device_start_timeout_key);
 EXPORT_SYMBOL(ccw_device_start_key);
 EXPORT_SYMBOL(ccw_device_get_ciw);
 EXPORT_SYMBOL(ccw_device_get_path_mask);
-EXPORT_SYMBOL(_ccw_device_get_subchannel_number);
 EXPORT_SYMBOL_GPL(ccw_device_get_chp_desc);
index 6559564ebe36c0d5cc8ed3cda47a22337c9628ff..31ddb966e2c0086ac772e1461307f800127ee680 100644 (file)
@@ -432,9 +432,8 @@ int qdio_setup_irq(struct qdio_initialize *init_data)
        irq_ptr->int_parm = init_data->int_parm;
        irq_ptr->nr_input_qs = init_data->no_input_qs;
        irq_ptr->nr_output_qs = init_data->no_output_qs;
-
-       irq_ptr->schid = ccw_device_get_subchannel_id(init_data->cdev);
        irq_ptr->cdev = init_data->cdev;
+       ccw_device_get_schid(irq_ptr->cdev, &irq_ptr->schid);
        setup_queues(irq_ptr, init_data);
 
        setup_qib(irq_ptr, init_data);