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>
This commit is contained in:
@@ -24,4 +24,5 @@ UCLASS_DRIVER(scsi) = {
|
||||
.id = UCLASS_SCSI,
|
||||
.name = "scsi",
|
||||
.post_probe = scsi_post_probe,
|
||||
.per_device_platdata_auto_alloc_size = sizeof(struct scsi_platdata),
|
||||
};
|
||||
|
||||
@@ -619,7 +619,7 @@ int scsi_scan(int mode)
|
||||
return ret;
|
||||
|
||||
/* Get controller platdata */
|
||||
plat = dev_get_platdata(dev);
|
||||
plat = dev_get_uclass_platdata(dev);
|
||||
|
||||
for (i = 0; i < plat->max_id; i++)
|
||||
for (lun = 0; lun < plat->max_lun; lun++)
|
||||
|
||||
Reference in New Issue
Block a user