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: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 4aa76c45..890c15b 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1604,6 +1604,9 @@
return NULL;
}
+ if (hws[0])
+ host->dev[0] = hws[0]->dev;
+
return host;
}
EXPORT_SYMBOL_GPL(ide_host_alloc_all);