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

Commit 6cdf6eb3 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz
Browse files

ide: add ->dev and ->host_priv fields to struct ide_host



* Add 'struct device *dev[2]' and 'void *host_priv' fields
  to struct ide_host.

* Set ->dev[] in ide_host_alloc_all()/ide_setup_pci_device[s]().

* Pass 'void *priv' argument to ide_setup_pci_device[s]()
  and use it to set ->host_priv.

* Set PCI dev's ->driver_data to point to the struct ide_host
  instance if PCI host driver wants to use ->host_priv.

* Rename ide_setup_pci_device[s]() to ide_pci_init_{one,two}().

Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 8c2eece5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1604,6 +1604,9 @@ struct ide_host *ide_host_alloc_all(const struct ide_port_info *d,
		return NULL;
	}

	if (hws[0])
		host->dev[0] = hws[0]->dev;

	return host;
}
EXPORT_SYMBOL_GPL(ide_host_alloc_all);
+1 −1
Original line number Diff line number Diff line
@@ -273,7 +273,7 @@ static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_devi
		}
	}

	err = ide_setup_pci_device(dev, &d);
	err = ide_pci_init_one(dev, &d, NULL);
	if (err)
		pci_disable_device(dev);

+1 −1
Original line number Diff line number Diff line
@@ -565,7 +565,7 @@ static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_dev
	if (idx == 0)
		d.host_flags |= IDE_HFLAG_CLEAR_SIMPLEX;

	return ide_setup_pci_device(dev, &d);
	return ide_pci_init_one(dev, &d, NULL);
}


+1 −1
Original line number Diff line number Diff line
@@ -302,7 +302,7 @@ static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_
			 d.name, pci_name(dev), dev->revision,
			 amd_dma[fls(d.udma_mask) - 1]);

	return ide_setup_pci_device(dev, &d);
	return ide_pci_init_one(dev, &d, NULL);
}

static const struct pci_device_id amd74xx_pci_tbl[] = {
+1 −1
Original line number Diff line number Diff line
@@ -167,7 +167,7 @@ static const struct ide_port_info atiixp_pci_info[] __devinitdata = {

static int __devinit atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
	return ide_setup_pci_device(dev, &atiixp_pci_info[id->driver_data]);
	return ide_pci_init_one(dev, &atiixp_pci_info[id->driver_data], NULL);
}

static const struct pci_device_id atiixp_pci_tbl[] = {
Loading