dm: treewide: Rename ..._platdata variables to just ..._plat
Try to maintain some consistency between these variables by using _plat as
a suffix for them.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/mtd/altera_qspi.c b/drivers/mtd/altera_qspi.c
index 250fb4f..0011811 100644
--- a/drivers/mtd/altera_qspi.c
+++ b/drivers/mtd/altera_qspi.c
@@ -48,7 +48,7 @@
u32 chip_select;
};
-struct altera_qspi_platdata {
+struct altera_qspi_plat {
struct altera_qspi_regs *regs;
void *base;
unsigned long size;
@@ -106,7 +106,7 @@
{
struct mtd_info *mtd = info->mtd;
struct udevice *dev = mtd->dev;
- struct altera_qspi_platdata *pdata = dev_get_plat(dev);
+ struct altera_qspi_plat *pdata = dev_get_plat(dev);
ulong base = (ulong)pdata->base;
loff_t to = addr - base;
size_t retlen;
@@ -135,7 +135,7 @@
static int altera_qspi_erase(struct mtd_info *mtd, struct erase_info *instr)
{
struct udevice *dev = mtd->dev;
- struct altera_qspi_platdata *pdata = dev_get_plat(dev);
+ struct altera_qspi_plat *pdata = dev_get_plat(dev);
struct altera_qspi_regs *regs = pdata->regs;
size_t addr = instr->addr;
size_t len = instr->len;
@@ -197,7 +197,7 @@
size_t *retlen, u_char *buf)
{
struct udevice *dev = mtd->dev;
- struct altera_qspi_platdata *pdata = dev_get_plat(dev);
+ struct altera_qspi_plat *pdata = dev_get_plat(dev);
memcpy_fromio(buf, pdata->base + from, len);
*retlen = len;
@@ -209,7 +209,7 @@
size_t *retlen, const u_char *buf)
{
struct udevice *dev = mtd->dev;
- struct altera_qspi_platdata *pdata = dev_get_plat(dev);
+ struct altera_qspi_plat *pdata = dev_get_plat(dev);
struct altera_qspi_regs *regs = pdata->regs;
u32 stat;
@@ -235,7 +235,7 @@
uint64_t *len)
{
struct udevice *dev = mtd->dev;
- struct altera_qspi_platdata *pdata = dev_get_plat(dev);
+ struct altera_qspi_plat *pdata = dev_get_plat(dev);
struct altera_qspi_regs *regs = pdata->regs;
int shift0 = ffs(QUADSPI_SR_BP2_0) - 1;
int shift3 = ffs(QUADSPI_SR_BP3) - 1 - 3;
@@ -257,7 +257,7 @@
static int altera_qspi_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
{
struct udevice *dev = mtd->dev;
- struct altera_qspi_platdata *pdata = dev_get_plat(dev);
+ struct altera_qspi_plat *pdata = dev_get_plat(dev);
struct altera_qspi_regs *regs = pdata->regs;
u32 sector_start, sector_end;
u32 num_sectors;
@@ -291,7 +291,7 @@
static int altera_qspi_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
{
struct udevice *dev = mtd->dev;
- struct altera_qspi_platdata *pdata = dev_get_plat(dev);
+ struct altera_qspi_plat *pdata = dev_get_plat(dev);
struct altera_qspi_regs *regs = pdata->regs;
u32 mem_op;
@@ -304,7 +304,7 @@
static int altera_qspi_probe(struct udevice *dev)
{
- struct altera_qspi_platdata *pdata = dev_get_plat(dev);
+ struct altera_qspi_plat *pdata = dev_get_plat(dev);
struct altera_qspi_regs *regs = pdata->regs;
unsigned long base = (unsigned long)pdata->base;
struct mtd_info *mtd;
@@ -348,7 +348,7 @@
static int altera_qspi_of_to_plat(struct udevice *dev)
{
- struct altera_qspi_platdata *pdata = dev_get_plat(dev);
+ struct altera_qspi_plat *pdata = dev_get_plat(dev);
void *blob = (void *)gd->fdt_blob;
int node = dev_of_offset(dev);
const char *list, *end;
@@ -401,6 +401,6 @@
.id = UCLASS_MTD,
.of_match = altera_qspi_ids,
.of_to_plat = altera_qspi_of_to_plat,
- .plat_auto = sizeof(struct altera_qspi_platdata),
+ .plat_auto = sizeof(struct altera_qspi_plat),
.probe = altera_qspi_probe,
};
diff --git a/drivers/mtd/spi/sandbox.c b/drivers/mtd/spi/sandbox.c
index 5027439..740bd75 100644
--- a/drivers/mtd/spi/sandbox.c
+++ b/drivers/mtd/spi/sandbox.c
@@ -124,7 +124,7 @@
const struct flash_info *data;
struct sandbox_spi_flash_plat_data *pdata = dev_get_plat(dev);
struct sandbox_state *state = state_get_current();
- struct dm_spi_slave_platdata *slave_plat;
+ struct dm_spi_slave_plat *slave_plat;
struct udevice *bus = dev->parent;
const char *spec = NULL;
struct udevice *emul;