@@ -5462,7 +5462,7 @@ struct ata_port *ata_port_alloc(struct ata_host *host)
ap->pflags |= ATA_PFLAG_INITIALIZING | ATA_PFLAG_FROZEN;
ap->lock = &host->lock;
- ap->print_id = -1;
+ ap->print_id = atomic_inc_return(&ata_print_id);
ap->host = host;
ap->dev = host->dev;
@@ -5899,10 +5899,6 @@ int ata_host_register(struct ata_host *host, const struct scsi_host_template *sh
return -EINVAL;
}
- /* give ports names and add SCSI hosts */
- for (i = 0; i < host->n_ports; i++)
- host->ports[i]->print_id = atomic_inc_return(&ata_print_id);
-
/* Create associated sysfs transport objects */
for (i = 0; i < host->n_ports; i++) {
rc = ata_tport_add(host->dev,host->ports[i]);
@@ -1234,7 +1234,6 @@ struct ata_port *ata_sas_port_alloc(struct ata_host *host,
ap->flags |= port_info->flags;
ap->ops = port_info->port_ops;
ap->cbl = ATA_CBL_SATA;
- ap->print_id = atomic_inc_return(&ata_print_id);
return ap;
}
@@ -32,7 +32,6 @@ enum {
#define ATA_PORT_TYPE_NAME "ata_port"
-extern atomic_t ata_print_id;
extern int atapi_passthru16;
extern int libata_fua;
extern int libata_noacpi;