]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[scsi] Use intfs_shutdown() when shutting down multiple interfaces
authorMichael Brown <mcb30@ipxe.org>
Thu, 9 Mar 2017 12:16:35 +0000 (12:16 +0000)
committerMichael Brown <mcb30@ipxe.org>
Thu, 9 Mar 2017 12:16:35 +0000 (12:16 +0000)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/block/scsi.c

index 847e0d46cb80f29daa9073ac295ef6d196e36918..51a1dc0c21b6d9a09f1ca00a76981f58efd8f0df 100644 (file)
@@ -394,8 +394,7 @@ static void scsicmd_close ( struct scsi_command *scsicmd, int rc ) {
        }
 
        /* Shut down interfaces */
-       intf_shutdown ( &scsicmd->scsi, rc );
-       intf_shutdown ( &scsicmd->block, rc );
+       intfs_shutdown ( rc, &scsicmd->scsi, &scsicmd->block, NULL );
 }
 
 /**
@@ -840,9 +839,8 @@ static void scsidev_close ( struct scsi_device *scsidev, int rc ) {
        process_del ( &scsidev->process );
 
        /* Shut down interfaces */
-       intf_shutdown ( &scsidev->block, rc );
-       intf_shutdown ( &scsidev->scsi, rc );
-       intf_shutdown ( &scsidev->ready, rc );
+       intfs_shutdown ( rc, &scsidev->block, &scsidev->scsi, &scsidev->ready,
+                        NULL );
 
        /* Shut down any remaining commands */
        list_for_each_entry_safe ( scsicmd, tmp, &scsidev->cmds, list ) {