summaryrefslogtreecommitdiff
path: root/drivers/ata/ahci.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-07-04 13:31:22 -0600
committerJaehoon Chung <jh80.chung@samsung.com>2017-08-01 11:58:01 +0900
commitbfc1c6b4838501d10aa48c0e92eaf70976f4b2dd (patch)
treec81d5e7c441dc3bf936b755caf3abc9beaed4f1c /drivers/ata/ahci.c
parent068a2fc1d500866e37f0ecc98806444c2996b25d (diff)
dm: ahci: Correct uclass private data
This is expected to be attached to the uclass and the code operates that way, but the uclass has not been updated. Fix it to avoid using memory at address 0. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 47fc61a (dm: ahci: Drop use of probe_ent)
Diffstat (limited to 'drivers/ata/ahci.c')
-rw-r--r--drivers/ata/ahci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 7c56f57bfd..5e4df19386 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -935,7 +935,7 @@ static int ahci_scsi_exec(struct udevice *dev, struct scsi_cmd *pccb)
{
struct ahci_uc_priv *uc_priv;
#ifdef CONFIG_DM_SCSI
- uc_priv = dev_get_uclass_priv(dev);
+ uc_priv = dev_get_uclass_priv(dev->parent);
#else
uc_priv = probe_ent;
#endif