summaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-05-26 15:06:53 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-05-30 12:18:27 +0200
commit73b0d228e5b00365e7289e9c258acb8de3f716b3 (patch)
treeb17c82b3a4f33d52fdd26c52086e1fa7eaac97a3 /drivers/ata
parent4a4f2f20b8873224983ab9b78173f9bc0564fa33 (diff)
downloadbarebox-73b0d228e5b00365e7289e9c258acb8de3f716b3.tar.gz
barebox-73b0d228e5b00365e7289e9c258acb8de3f716b3.tar.xz
driver: Attach info callback to device, not to driver
Since the info is device specific and not driver specific, attach the callback to the device. This makes it possible to have a info callback for a device which does not have a driver attached. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/ahci.c2
-rw-r--r--drivers/ata/sata-imx.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 37419f239a..7def9a093b 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -635,6 +635,7 @@ static int ahci_probe(struct device_d *dev)
ahci->dev = dev;
ahci->mmio_base = regs;
dev->priv = ahci;
+ dev->info = ahci_info;
ret = ahci_add_host(ahci);
if (ret)
@@ -654,7 +655,6 @@ static __maybe_unused struct of_device_id ahci_dt_ids[] = {
static struct driver_d ahci_driver = {
.name = "ahci",
.probe = ahci_probe,
- .info = ahci_info,
.of_compatible = DRV_OF_COMPAT(ahci_dt_ids),
};
device_platform_driver(ahci_driver);
diff --git a/drivers/ata/sata-imx.c b/drivers/ata/sata-imx.c
index bd48fae1f4..13bf116fdd 100644
--- a/drivers/ata/sata-imx.c
+++ b/drivers/ata/sata-imx.c
@@ -107,6 +107,7 @@ static int imx_sata_probe(struct device_d *dev)
imx_ahci->ahci.dev = dev;
dev->priv = &imx_ahci->ahci;
+ dev->info = ahci_info,
ret = ahci_add_host(&imx_ahci->ahci);
if (ret)
@@ -143,7 +144,6 @@ static struct platform_device_id imx_sata_ids[] = {
static struct driver_d imx_sata_driver = {
.name = "imx-sata",
.probe = imx_sata_probe,
- .info = ahci_info,
.id_table = imx_sata_ids,
};
device_platform_driver(imx_sata_driver);