From 658cc3d497718f1c4b4a0ab5ffa9b6bdcabc4531 Mon Sep 17 00:00:00 2001 From: manu Date: Fri, 16 Dec 2016 15:33:21 +0000 Subject: MFC r309912: CS ivar is uint32_t, not int. --- sys/arm/ti/ti_spi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/arm/ti') diff --git a/sys/arm/ti/ti_spi.c b/sys/arm/ti/ti_spi.c index e35f365..68805a8 100644 --- a/sys/arm/ti/ti_spi.c +++ b/sys/arm/ti/ti_spi.c @@ -445,9 +445,9 @@ ti_spi_gcd(int a, int b) static int ti_spi_transfer(device_t dev, device_t child, struct spi_command *cmd) { - int cs, err; + int err; struct ti_spi_softc *sc; - uint32_t reg; + uint32_t reg, cs; sc = device_get_softc(dev); @@ -458,7 +458,7 @@ ti_spi_transfer(device_t dev, device_t child, struct spi_command *cmd) /* Get the proper chip select for this child. */ spibus_get_cs(child, &cs); - if (cs < 0 || cs > sc->sc_numcs) { + if (cs > sc->sc_numcs) { device_printf(dev, "Invalid chip select %d requested by %s\n", cs, device_get_nameunit(child)); return (EINVAL); -- cgit v1.1