Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd0d3bbc authored by Alan Cox's avatar Alan Cox Committed by Jeff Garzik
Browse files

libata: dev_config does not need ap and adev passing



It used to be impossible to get from ata_device to ata_port but that is
no longer true. Various methods have been cleaned up over time but
dev_config still takes both and most users don't need both anyway. Tidy
this one up

Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent d88184fb
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1792,7 +1792,7 @@ int ata_dev_configure(struct ata_device *dev)
		dev->horkage |= ATA_HORKAGE_DMA_RW_ONLY;
		dev->horkage |= ATA_HORKAGE_DMA_RW_ONLY;


	if (ap->ops->dev_config)
	if (ap->ops->dev_config)
		ap->ops->dev_config(ap, dev);
		ap->ops->dev_config(dev);


	if (ata_msg_probe(ap))
	if (ata_msg_probe(ap))
		ata_dev_printk(dev, KERN_DEBUG, "%s: EXIT, drv_stat = 0x%x\n",
		ata_dev_printk(dev, KERN_DEBUG, "%s: EXIT, drv_stat = 0x%x\n",
+1 −1
Original line number Original line Diff line number Diff line
@@ -324,7 +324,7 @@ static void ali_set_dmamode(struct ata_port *ap, struct ata_device *adev)
 *	slower PIO methods
 *	slower PIO methods
 */
 */


static void ali_lock_sectors(struct ata_port *ap, struct ata_device *adev)
static void ali_lock_sectors(struct ata_device *adev)
{
{
	adev->max_sectors = 255;
	adev->max_sectors = 255;
}
}
+1 −2
Original line number Original line Diff line number Diff line
@@ -520,7 +520,6 @@ static int it821x_smart_set_mode(struct ata_port *ap, struct ata_device **unused


/**
/**
 *	it821x_dev_config	-	Called each device identify
 *	it821x_dev_config	-	Called each device identify
 *	@ap: ATA port
 *	@adev: Device that has just been identified
 *	@adev: Device that has just been identified
 *
 *
 *	Perform the initial setup needed for each device that is chip
 *	Perform the initial setup needed for each device that is chip
@@ -531,7 +530,7 @@ static int it821x_smart_set_mode(struct ata_port *ap, struct ata_device **unused
 *	basically we need to filter commands for this chip.
 *	basically we need to filter commands for this chip.
 */
 */


static void it821x_dev_config(struct ata_port *ap, struct ata_device *adev)
static void it821x_dev_config(struct ata_device *adev)
{
{
	unsigned char model_num[ATA_ID_PROD_LEN + 1];
	unsigned char model_num[ATA_ID_PROD_LEN + 1];


+1 −2
Original line number Original line Diff line number Diff line
@@ -244,7 +244,6 @@ static void pdc2026x_bmdma_stop(struct ata_queued_cmd *qc)


/**
/**
 *	pdc2026x_dev_config	-	device setup hook
 *	pdc2026x_dev_config	-	device setup hook
 *	@ap: ATA port
 *	@adev: newly found device
 *	@adev: newly found device
 *
 *
 *	Perform chip specific early setup. We need to lock the transfer
 *	Perform chip specific early setup. We need to lock the transfer
@@ -252,7 +251,7 @@ static void pdc2026x_bmdma_stop(struct ata_queued_cmd *qc)
 *	barf.
 *	barf.
 */
 */


static void pdc2026x_dev_config(struct ata_port *ap, struct ata_device *adev)
static void pdc2026x_dev_config(struct ata_device *adev)
{
{
	adev->max_sectors = 256;
	adev->max_sectors = 256;
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -492,7 +492,7 @@ static void inic_post_internal_cmd(struct ata_queued_cmd *qc)
		inic_reset_port(inic_port_base(qc->ap));
		inic_reset_port(inic_port_base(qc->ap));
}
}


static void inic_dev_config(struct ata_port *ap, struct ata_device *dev)
static void inic_dev_config(struct ata_device *dev)
{
{
	/* inic can only handle upto LBA28 max sectors */
	/* inic can only handle upto LBA28 max sectors */
	if (dev->max_sectors > ATA_MAX_SECTORS)
	if (dev->max_sectors > ATA_MAX_SECTORS)
Loading