ata,scsi: remove ata_sas_port_destroy()
Is now a wrapper around kfree(), so call it directly. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Jason Yan <yanaijie@huawei.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>pull/806/head
parent
43aa43351b
commit
6c2fe21e08
|
|
@ -1194,20 +1194,6 @@ void ata_sas_tport_delete(struct ata_port *ap)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(ata_sas_tport_delete);
|
EXPORT_SYMBOL_GPL(ata_sas_tport_delete);
|
||||||
|
|
||||||
/**
|
|
||||||
* ata_sas_port_destroy - Destroy a SATA port allocated by ata_sas_port_alloc
|
|
||||||
* @ap: SATA port to destroy
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
void ata_sas_port_destroy(struct ata_port *ap)
|
|
||||||
{
|
|
||||||
if (ap->ops->port_stop)
|
|
||||||
ap->ops->port_stop(ap);
|
|
||||||
kfree(ap);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL_GPL(ata_sas_port_destroy);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ata_sas_slave_configure - Default slave_config routine for libata devices
|
* ata_sas_slave_configure - Default slave_config routine for libata devices
|
||||||
* @sdev: SCSI device to configure
|
* @sdev: SCSI device to configure
|
||||||
|
|
|
||||||
|
|
@ -619,7 +619,7 @@ int sas_ata_init(struct domain_device *found_dev)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
destroy_port:
|
destroy_port:
|
||||||
ata_sas_port_destroy(ap);
|
kfree(ap);
|
||||||
free_host:
|
free_host:
|
||||||
ata_host_put(ata_host);
|
ata_host_put(ata_host);
|
||||||
return rc;
|
return rc;
|
||||||
|
|
|
||||||
|
|
@ -301,7 +301,7 @@ void sas_free_device(struct kref *kref)
|
||||||
|
|
||||||
if (dev_is_sata(dev) && dev->sata_dev.ap) {
|
if (dev_is_sata(dev) && dev->sata_dev.ap) {
|
||||||
ata_sas_tport_delete(dev->sata_dev.ap);
|
ata_sas_tport_delete(dev->sata_dev.ap);
|
||||||
ata_sas_port_destroy(dev->sata_dev.ap);
|
kfree(dev->sata_dev.ap);
|
||||||
ata_host_put(dev->sata_dev.ata_host);
|
ata_host_put(dev->sata_dev.ata_host);
|
||||||
dev->sata_dev.ata_host = NULL;
|
dev->sata_dev.ata_host = NULL;
|
||||||
dev->sata_dev.ap = NULL;
|
dev->sata_dev.ap = NULL;
|
||||||
|
|
|
||||||
|
|
@ -1238,7 +1238,6 @@ extern int sata_link_debounce(struct ata_link *link,
|
||||||
extern int sata_link_scr_lpm(struct ata_link *link, enum ata_lpm_policy policy,
|
extern int sata_link_scr_lpm(struct ata_link *link, enum ata_lpm_policy policy,
|
||||||
bool spm_wakeup);
|
bool spm_wakeup);
|
||||||
extern int ata_slave_link_init(struct ata_port *ap);
|
extern int ata_slave_link_init(struct ata_port *ap);
|
||||||
extern void ata_sas_port_destroy(struct ata_port *);
|
|
||||||
extern struct ata_port *ata_sas_port_alloc(struct ata_host *,
|
extern struct ata_port *ata_sas_port_alloc(struct ata_host *,
|
||||||
struct ata_port_info *, struct Scsi_Host *);
|
struct ata_port_info *, struct Scsi_Host *);
|
||||||
extern void ata_sas_async_probe(struct ata_port *ap);
|
extern void ata_sas_async_probe(struct ata_port *ap);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue