u-boot-brain/drivers/scsi/scsi-uclass.c
Simon Glass caa4daa2ae dm: treewide: Rename 'platdata' variables to just 'plat'
We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).

Rename some of the latter variables to end with 'plat' for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-13 16:51:08 -07:00

40 lines
722 B
C

// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2015 Google, Inc
* Written by Simon Glass <sjg@chromium.org>
* Copyright (c) 2016 Xilinx, Inc
* Written by Michal Simek
*
* Based on ahci-uclass.c
*/
#include <common.h>
#include <dm.h>
#include <scsi.h>
int scsi_exec(struct udevice *dev, struct scsi_cmd *pccb)
{
struct scsi_ops *ops = scsi_get_ops(dev);
if (!ops->exec)
return -ENOSYS;
return ops->exec(dev, pccb);
}
int scsi_bus_reset(struct udevice *dev)
{
struct scsi_ops *ops = scsi_get_ops(dev);
if (!ops->bus_reset)
return -ENOSYS;
return ops->bus_reset(dev);
}
UCLASS_DRIVER(scsi) = {
.id = UCLASS_SCSI,
.name = "scsi",
.per_device_plat_auto = sizeof(struct scsi_platdata),
};