diff options
author | Simon Glass <sjg@chromium.org> | 2017-06-15 06:28:31 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-07-11 19:08:19 +0300 |
commit | 1dc64f6c00e89f11e3615403459207405ab0efda (patch) | |
tree | e3095ec40a37e7e48a38cbabfa6391e7458823ae /drivers/ata/dwc_ahci.c | |
parent | b9560ad649b8c523bf303cf9ba981e498988c5d9 (diff) | |
download | u-boot-1dc64f6c00e89f11e3615403459207405ab0efda.tar.xz |
dm: scsi: Use the uclass platform data
At present the two driver-model SCSI drivers use device platform data to
store information that relates to the uclass. It is better to use uclass
platform data in this situation. Update the code to do this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/ata/dwc_ahci.c')
-rw-r--r-- | drivers/ata/dwc_ahci.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/ata/dwc_ahci.c b/drivers/ata/dwc_ahci.c index 3f839bf987..e634df5e3c 100644 --- a/drivers/ata/dwc_ahci.c +++ b/drivers/ata/dwc_ahci.c @@ -28,7 +28,7 @@ struct dwc_ahci_priv { static int dwc_ahci_ofdata_to_platdata(struct udevice *dev) { struct dwc_ahci_priv *priv = dev_get_priv(dev); - struct scsi_platdata *plat = dev_get_platdata(dev); + struct scsi_platdata *plat = dev_get_uclass_platdata(dev); fdt_addr_t addr; plat->max_id = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev), @@ -96,6 +96,5 @@ U_BOOT_DRIVER(dwc_ahci) = { .ofdata_to_platdata = dwc_ahci_ofdata_to_platdata, .probe = dwc_ahci_probe, .priv_auto_alloc_size = sizeof(struct dwc_ahci_priv), - .platdata_auto_alloc_size = sizeof(struct scsi_platdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; |