diff options
author | Simon Glass <sjg@chromium.org> | 2017-06-14 21:28:31 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-07-11 10:08:19 -0600 |
commit | 1dc64f6c00e89f11e3615403459207405ab0efda (patch) | |
tree | e3095ec40a37e7e48a38cbabfa6391e7458823ae /drivers/ata/sata_ceva.c | |
parent | b9560ad649b8c523bf303cf9ba981e498988c5d9 (diff) | |
download | u-boot-1dc64f6c00e89f11e3615403459207405ab0efda.zip u-boot-1dc64f6c00e89f11e3615403459207405ab0efda.tar.gz u-boot-1dc64f6c00e89f11e3615403459207405ab0efda.tar.bz2 |
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/sata_ceva.c')
-rw-r--r-- | drivers/ata/sata_ceva.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/ata/sata_ceva.c b/drivers/ata/sata_ceva.c index 0c24fce..f55ba59 100644 --- a/drivers/ata/sata_ceva.c +++ b/drivers/ata/sata_ceva.c @@ -113,7 +113,7 @@ static int ceva_init_sata(ulong mmio) static int sata_ceva_probe(struct udevice *dev) { - struct scsi_platdata *plat = dev_get_platdata(dev); + struct scsi_platdata *plat = dev_get_uclass_platdata(dev); ceva_init_sata(plat->base); return 0; @@ -126,7 +126,7 @@ static const struct udevice_id sata_ceva_ids[] = { static int sata_ceva_ofdata_to_platdata(struct udevice *dev) { - struct scsi_platdata *plat = dev_get_platdata(dev); + struct scsi_platdata *plat = dev_get_uclass_platdata(dev); plat->base = devfdt_get_addr(dev); if (plat->base == FDT_ADDR_T_NONE) @@ -145,5 +145,4 @@ U_BOOT_DRIVER(ceva_host_blk) = { .of_match = sata_ceva_ids, .probe = sata_ceva_probe, .ofdata_to_platdata = sata_ceva_ofdata_to_platdata, - .platdata_auto_alloc_size = sizeof(struct scsi_platdata), }; |