]> rtime.felk.cvut.cz Git - linux-imx.git/blobdiff - drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
[SCSI] cxgb4i: Remove the scsi host device when removing device
[linux-imx.git] / drivers / scsi / cxgbi / cxgb4i / cxgb4i.c
index f924b3c3720e3fa268db4470e0987b388e4eee7d..3fecf35ba2926f6e27d29ae0463d9b97755c3a92 100644 (file)
@@ -1564,6 +1564,7 @@ static int t4_uld_state_change(void *handle, enum cxgb4_state state)
                break;
        case CXGB4_STATE_DETACH:
                pr_info("cdev 0x%p, DETACH.\n", cdev);
+               cxgbi_device_unregister(cdev);
                break;
        default:
                pr_info("cdev 0x%p, unknown state %d.\n", cdev, state);