Rename __scsi_remove_device() into scsi_sysfs_remove_sdev()
PATCH 6/11 Rename __scsi_remove_device() into scsi_sysfs_remove_sdev()
__scsi_remove_device() is actually the counterpart to scsi_sysfs_add_sdev(). So we'd better rename it to avoid confusion.
Signed-off-by Hannes Reinecke <[email protected]>
--- drivers/scsi/scsi_priv.h | 2 +- drivers/scsi/scsi_scan.c | 4 ++-- drivers/scsi/scsi_sysfs.c | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-)
drivers/scsi/scsi_priv.h +1 -1
@@ -114,7 +114,7 @@ extern void scsi_sysfs_unregister(void);extern void scsi_sysfs_device_initialize (struct scsi_device *);extern int scsi_sysfs_target_initialize (struct scsi_device *);extern struct scsi_transport_template blank_transport_template; -extern void __scsi_remove_device (struct scsi_device *); +extern void scsi_sysfs_remove_sdev (struct scsi_device *);extern struct bus_type scsi_bus_type;
drivers/scsi/scsi_scan.c +2 -2
@@ -1099,7 +1099,7 @@ static int scsi_probe_and_add_lun(structif (scsi_device_get (sdev) ==0 ) { *sdevp = sdev; }else { -__scsi_remove_device (sdev); +scsi_sysfs_remove_sdev (sdev);scsi_destroy_device (sdev); res =SCSI_SCAN_NO_RESPONSE ; }
@@ -1815,7 +1815,7 @@ void scsi_forget_host(struct Scsi_Host *if (sdev->sdev_state ==SDEV_DEL )continue ;spin_unlock_irqrestore (shost->host_lock, flags); -__scsi_remove_device (sdev); +scsi_sysfs_remove_sdev (sdev); goto restart; }spin_unlock_irqrestore (shost->host_lock, flags);
drivers/scsi/scsi_sysfs.c +5 -5
@@ -747,7 +747,7 @@ int scsi_sysfs_add_sdev(struct scsi_devi error =attr_add (&sdev->sdev_gendev, sdev->host->hostt->sdev_attrs[i]);if (error) { -__scsi_remove_device (sdev); +scsi_sysfs_remove_sdev (sdev);scsi_destroy_device (sdev); goto out; }
@@ -762,7 +762,7 @@ int scsi_sysfs_add_sdev(struct scsi_devi scsi_sysfs_sdev_attrs[i]); error =device_create_file (&sdev->sdev_gendev, attr);if (error) { -__scsi_remove_device (sdev); +scsi_sysfs_remove_sdev (sdev);scsi_destroy_device (sdev); goto out; }
@@ -774,7 +774,7 @@ int scsi_sysfs_add_sdev(struct scsi_devireturn error; } -void __scsi_remove_device (struct scsi_device *sdev) +void scsi_sysfs_remove_sdev (struct scsi_device *sdev) {struct device *dev = &sdev->sdev_gendev;
@@ -783,7 +783,7 @@ void __scsi_remove_device(struct scsi_declass_device_del (&sdev->sdev_classdev);/* Release the refcount hold for the classdev */ -put_device (&sdev->sdev_gendev); +put_device (dev);transport_remove_device (dev);device_del (dev); }
@@ -797,7 +797,7 @@ void scsi_remove_device(struct scsi_devistruct Scsi_Host *shost = sdev->host;mutex_lock (&shost->scan_mutex); -__scsi_remove_device (sdev); +scsi_sysfs_remove_sdev (sdev);scsi_destroy_device (sdev);mutex_unlock (&shost->scan_mutex); }
Signature · 1 line
1.4.3.4