aboutsummaryrefslogtreecommitdiff
path: root/drivers/spi/soft_spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/soft_spi.c')
-rw-r--r--drivers/spi/soft_spi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/spi/soft_spi.c b/drivers/spi/soft_spi.c
index c7ed23aa5dd..1967134d418 100644
--- a/drivers/spi/soft_spi.c
+++ b/drivers/spi/soft_spi.c
@@ -41,7 +41,7 @@ struct soft_spi_priv {
static int soft_spi_scl(struct udevice *dev, int bit)
{
struct udevice *bus = dev_get_parent(dev);
- struct soft_spi_platdata *plat = dev_get_platdata(bus);
+ struct soft_spi_platdata *plat = dev_get_plat(bus);
dm_gpio_set_value(&plat->sclk, bit);
@@ -51,7 +51,7 @@ static int soft_spi_scl(struct udevice *dev, int bit)
static int soft_spi_sda(struct udevice *dev, int bit)
{
struct udevice *bus = dev_get_parent(dev);
- struct soft_spi_platdata *plat = dev_get_platdata(bus);
+ struct soft_spi_platdata *plat = dev_get_plat(bus);
dm_gpio_set_value(&plat->mosi, bit);
@@ -62,7 +62,7 @@ static int soft_spi_cs_activate(struct udevice *dev)
{
struct udevice *bus = dev_get_parent(dev);
struct soft_spi_priv *priv = dev_get_priv(bus);
- struct soft_spi_platdata *plat = dev_get_platdata(bus);
+ struct soft_spi_platdata *plat = dev_get_plat(bus);
int cidle = !!(priv->mode & SPI_CPOL);
dm_gpio_set_value(&plat->cs, 0);
@@ -75,7 +75,7 @@ static int soft_spi_cs_activate(struct udevice *dev)
static int soft_spi_cs_deactivate(struct udevice *dev)
{
struct udevice *bus = dev_get_parent(dev);
- struct soft_spi_platdata *plat = dev_get_platdata(bus);
+ struct soft_spi_platdata *plat = dev_get_plat(bus);
dm_gpio_set_value(&plat->cs, 0);
@@ -117,7 +117,7 @@ static int soft_spi_xfer(struct udevice *dev, unsigned int bitlen,
{
struct udevice *bus = dev_get_parent(dev);
struct soft_spi_priv *priv = dev_get_priv(bus);
- struct soft_spi_platdata *plat = dev_get_platdata(bus);
+ struct soft_spi_platdata *plat = dev_get_plat(bus);
uchar tmpdin = 0;
uchar tmpdout = 0;
const u8 *txd = dout;