ncr5380: Remove NCR5380_instance_name macro
authorFinn Thain <fthain@telegraphics.com.au>
Sun, 3 Jan 2016 05:05:07 +0000 (16:05 +1100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 7 Jan 2016 02:42:52 +0000 (21:42 -0500)
This macro makes the code cryptic. Remove it.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Tested-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/NCR5380.c
drivers/scsi/g_NCR5380.c
drivers/scsi/g_NCR5380.h

index e4cd85e1ea5b3a1f520efefad40048c50c55188b..78d7858c4404be815bd98027f303cb8873ec6fb0 100644 (file)
@@ -790,7 +790,7 @@ static int NCR5380_init(struct Scsi_Host *instance, int flags)
 
 #ifdef NCR53C400
        if (flags & FLAG_NCR53C400)
-               instance->NCR5380_instance_name += NCR53C400_address_adjust;
+               instance->io_port += NCR53C400_address_adjust;
 #endif
 
        hostdata->aborted = 0;
index 21f8236df48f7fd24c13a13a5370111805183e34..4559fbc7f3428f1827e9e4f3cadaa16d73992fc3 100644 (file)
@@ -412,10 +412,11 @@ static int __init generic_NCR5380_detect(struct scsi_host_template *tpnt)
                        continue;
                }
 
-               instance->NCR5380_instance_name = overrides[current_override].NCR5380_map_name;
 #ifndef SCSI_G_NCR5380_MEM
+               instance->io_port = overrides[current_override].NCR5380_map_name;
                instance->n_io_port = region_size;
 #else
+               instance->base = overrides[current_override].NCR5380_map_name;
                ((struct NCR5380_hostdata *)instance->hostdata)->iomem = iomem;
 #endif
 
@@ -464,10 +465,10 @@ static int generic_NCR5380_release_resources(struct Scsi_Host *instance)
        NCR5380_exit(instance);
 
 #ifndef SCSI_G_NCR5380_MEM
-       release_region(instance->NCR5380_instance_name, instance->n_io_port);
+       release_region(instance->io_port, instance->n_io_port);
 #else
        iounmap(((struct NCR5380_hostdata *)instance->hostdata)->iomem);
-       release_mem_region(instance->NCR5380_instance_name, NCR5380_region_size);
+       release_mem_region(instance->base, NCR5380_region_size);
 #endif
 
 
index 883c003394cfc61073b9f763c3867cbd8ee60fff..c2d072aabd31992be2bae5fb6d0ec49fb4a9906d 100644 (file)
@@ -36,7 +36,6 @@
 
 #define NCR5380_map_type int
 #define NCR5380_map_name port
-#define NCR5380_instance_name io_port
 #define NCR53C400_register_offset 0
 #define NCR53C400_address_adjust 8
 
@@ -58,7 +57,6 @@
 
 #define NCR5380_map_type unsigned long
 #define NCR5380_map_name base
-#define NCR5380_instance_name base
 #define NCR53C400_register_offset 0x108
 #define NCR53C400_address_adjust 0
 #define NCR53C400_mem_base 0x3880