Skip to contentSkip to conversation

spi: omap3: Fix redeclared error

PATCH New Jagan Teki 2 participants 2 messages Mar 14, 2018 SPI

lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

PATCH 1/1 spi: omap3: Fix redeclared error

omap3_spi_set_speed|mode redeclared bus symbol, fix the same.

error:
drivers/spi/omap3_spi.c: In function ‘omap3_spi_set_speed’:
drivers/spi/omap3_spi.c:650:18: error: ‘bus’ redeclared as different kind of symbol
struct udevice *bus = dev->parent;

---
 drivers/spi/omap3_spi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/spi/omap3_spi.c +2 -2
index b8a0bf495a..053a67bbe0 100644
@@ -645,7 +645,7 @@ static int omap3_spi_xfer(struct udevice *dev, unsigned int bitlen,
 	return _spi_xfer(priv, bitlen, dout, din, flags);
 }
 
-static int omap3_spi_set_speed(struct udevice *bus, unsigned int speed)
+static int omap3_spi_set_speed(struct udevice *dev, unsigned int speed)
 {
 	struct udevice *bus = dev->parent;
 	struct omap3_spi_priv *priv = dev_get_priv(bus);
@@ -658,7 +658,7 @@ static int omap3_spi_set_speed(struct udevice *bus, unsigned int speed)
 	return 0;
 }
 
-static int omap3_spi_set_mode(struct udevice *bus, uint mode)
+static int omap3_spi_set_mode(struct udevice *dev, uint mode)
 {
 	struct udevice *bus = dev->parent;
 	struct omap3_spi_priv *priv = dev_get_priv(bus);
Signature · 1 line
2.14.3
#1 lore raw

PATCH 1/1 spi: omap3: Fix redeclared error

Quoted 9 lines · Jagan Teki

omap3_spi_set_speed|mode redeclared bus symbol, fix the same.

error:
drivers/spi/omap3_spi.c: In function ‘omap3_spi_set_speed’:
drivers/spi/omap3_spi.c:650:18: error: ‘bus’ redeclared as different kind of symbol
struct udevice *bus = dev->parent;

---

Applied to u-boot-spi/master