]> err.no Git - linux-2.6/blobdiff - drivers/s390/scsi/zfcp_ccw.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[linux-2.6] / drivers / s390 / scsi / zfcp_ccw.c
index 81680efa172138499311cab2789070a115f0c730..e01cbf152a81d3622a5d4a607b103ab472e607d0 100644 (file)
@@ -28,7 +28,7 @@ static void zfcp_ccw_remove(struct ccw_device *);
 static int zfcp_ccw_set_online(struct ccw_device *);
 static int zfcp_ccw_set_offline(struct ccw_device *);
 static int zfcp_ccw_notify(struct ccw_device *, int);
-static void zfcp_ccw_shutdown(struct device *);
+static void zfcp_ccw_shutdown(struct ccw_device *);
 
 static struct ccw_device_id zfcp_ccw_device_id[] = {
        {CCW_DEVICE_DEVTYPE(ZFCP_CONTROL_UNIT_TYPE,
@@ -51,9 +51,7 @@ static struct ccw_driver zfcp_ccw_driver = {
        .set_online  = zfcp_ccw_set_online,
        .set_offline = zfcp_ccw_set_offline,
        .notify      = zfcp_ccw_notify,
-       .driver      = {
-               .shutdown = zfcp_ccw_shutdown,
-       },
+       .shutdown    = zfcp_ccw_shutdown,
 };
 
 MODULE_DEVICE_TABLE(ccw, zfcp_ccw_device_id);
@@ -150,15 +148,12 @@ zfcp_ccw_set_online(struct ccw_device *ccw_device)
        down(&zfcp_data.config_sema);
        adapter = dev_get_drvdata(&ccw_device->dev);
 
-       retval = zfcp_adapter_debug_register(adapter);
-       if (retval)
-               goto out;
        retval = zfcp_erp_thread_setup(adapter);
        if (retval) {
                ZFCP_LOG_INFO("error: start of error recovery thread for "
                              "adapter %s failed\n",
                              zfcp_get_busid_by_adapter(adapter));
-               goto out_erp_thread;
+               goto out;
        }
 
        retval = zfcp_adapter_scsi_register(adapter);
@@ -177,8 +172,6 @@ zfcp_ccw_set_online(struct ccw_device *ccw_device)
 
  out_scsi_register:
        zfcp_erp_thread_kill(adapter);
- out_erp_thread:
-       zfcp_adapter_debug_unregister(adapter);
  out:
        up(&zfcp_data.config_sema);
        return retval;
@@ -189,9 +182,7 @@ zfcp_ccw_set_online(struct ccw_device *ccw_device)
  * @ccw_device: pointer to belonging ccw device
  *
  * This function gets called by the common i/o layer and sets an adapter
- * into state offline. Setting an fcp device offline means that it will be
- * unregistered from the SCSI stack and that the adapter will be shut down
- * asynchronously.
+ * into state offline.
  */
 static int
 zfcp_ccw_set_offline(struct ccw_device *ccw_device)
@@ -202,9 +193,7 @@ zfcp_ccw_set_offline(struct ccw_device *ccw_device)
        adapter = dev_get_drvdata(&ccw_device->dev);
        zfcp_erp_adapter_shutdown(adapter, 0);
        zfcp_erp_wait(adapter);
-       zfcp_adapter_scsi_unregister(adapter);
        zfcp_erp_thread_kill(adapter);
-       zfcp_adapter_debug_unregister(adapter);
        up(&zfcp_data.config_sema);
        return 0;
 }
@@ -280,12 +269,12 @@ zfcp_ccw_register(void)
  * Makes sure that QDIO queues are down when the system gets stopped.
  */
 static void
-zfcp_ccw_shutdown(struct device *dev)
+zfcp_ccw_shutdown(struct ccw_device *cdev)
 {
        struct zfcp_adapter *adapter;
 
        down(&zfcp_data.config_sema);
-       adapter = dev_get_drvdata(dev);
+       adapter = dev_get_drvdata(&cdev->dev);
        zfcp_erp_adapter_shutdown(adapter, 0);
        zfcp_erp_wait(adapter);
        up(&zfcp_data.config_sema);