diff options
author | Tejun Heo <htejun@gmail.com> | 2006-08-10 03:59:01 -0400 |
---|---|---|
committer | Tejun Heo <htejun@gmail.com> | 2006-08-10 03:59:01 -0400 |
commit | 4608c1608501cf2b0dc4478c9b6c3902db58408a (patch) | |
tree | 5b179b34ff3878498c887d5ae9c409f6044342e9 /drivers | |
parent | 3f066887595de490c411762ce58a31412b09e939 (diff) |
[PATCH] libata: update ata_host_init() and rename it to ata_port_init_shost()
Update ata_host_init() such that it only initializes SCSI host related
stuff and doesn't call into ata_port_init(), and rename it to
ata_port_init_shost().
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/libata-core.c | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 83d93fc0751b..eb9de073639c 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -5288,32 +5288,24 @@ void ata_port_init(struct ata_port *ap, struct ata_host_set *host_set, | |||
5288 | } | 5288 | } |
5289 | 5289 | ||
5290 | /** | 5290 | /** |
5291 | * ata_host_init - Initialize an ata_port structure | 5291 | * ata_port_init_shost - Initialize SCSI host associated with ATA port |
5292 | * @ap: Structure to initialize | 5292 | * @ap: ATA port to initialize SCSI host for |
5293 | * @host: associated SCSI mid-layer structure | 5293 | * @shost: SCSI host associated with @ap |
5294 | * @host_set: Collection of hosts to which @ap belongs | ||
5295 | * @ent: Probe information provided by low-level driver | ||
5296 | * @port_no: Port number associated with this ata_port | ||
5297 | * | 5294 | * |
5298 | * Initialize a new ata_port structure, and its associated | 5295 | * Initialize SCSI host @shost associated with ATA port @ap. |
5299 | * scsi_host. | ||
5300 | * | 5296 | * |
5301 | * LOCKING: | 5297 | * LOCKING: |
5302 | * Inherited from caller. | 5298 | * Inherited from caller. |
5303 | */ | 5299 | */ |
5304 | 5300 | static void ata_port_init_shost(struct ata_port *ap, struct Scsi_Host *shost) | |
5305 | static void ata_host_init(struct ata_port *ap, struct Scsi_Host *host, | ||
5306 | struct ata_host_set *host_set, | ||
5307 | const struct ata_probe_ent *ent, unsigned int port_no) | ||
5308 | { | 5301 | { |
5309 | ata_port_init(ap, host_set, ent, port_no); | 5302 | ap->host = shost; |
5310 | ap->host = host; | ||
5311 | 5303 | ||
5312 | host->unique_id = ap->id; | 5304 | shost->unique_id = ap->id; |
5313 | host->max_id = 16; | 5305 | shost->max_id = 16; |
5314 | host->max_lun = 1; | 5306 | shost->max_lun = 1; |
5315 | host->max_channel = 1; | 5307 | shost->max_channel = 1; |
5316 | host->max_cmd_len = 12; | 5308 | shost->max_cmd_len = 12; |
5317 | } | 5309 | } |
5318 | 5310 | ||
5319 | /** | 5311 | /** |
@@ -5356,7 +5348,8 @@ static struct ata_port * ata_host_add(const struct ata_probe_ent *ent, | |||
5356 | 5348 | ||
5357 | ap = ata_shost_to_port(host); | 5349 | ap = ata_shost_to_port(host); |
5358 | 5350 | ||
5359 | ata_host_init(ap, host, host_set, ent, port_no); | 5351 | ata_port_init(ap, host_set, ent, port_no); |
5352 | ata_port_init_shost(ap, host); | ||
5360 | 5353 | ||
5361 | rc = ap->ops->port_start(ap); | 5354 | rc = ap->ops->port_start(ap); |
5362 | if (rc) | 5355 | if (rc) |