From b0f216b3b2b8f684d03b677305ffa41c859c3fc2 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 3 Mar 2013 16:22:18 +0100 Subject: [PATCH] spi driver: remove compilation warnings spi_posix.c:141:1: warning: no previous prototype for 'bit_reversal' [-Wmissing-prototypes] => set bit_reversal() static pn532_spi.c:258:48: warning: unused parameter 'timeout' [-Wunused-parameter] => remove timeout in pn532_spi_read_spi_status() params --- libnfc/buses/spi_posix.c | 2 +- libnfc/drivers/pn532_spi.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libnfc/buses/spi_posix.c b/libnfc/buses/spi_posix.c index ff725c6..fdf000a 100644 --- a/libnfc/buses/spi_posix.c +++ b/libnfc/buses/spi_posix.c @@ -137,7 +137,7 @@ spi_close(const spi_port sp) * @return reversed byte */ -uint8_t +static uint8_t bit_reversal(const uint8_t x) { uint8_t ret = x; diff --git a/libnfc/drivers/pn532_spi.c b/libnfc/drivers/pn532_spi.c index 37a202a..cef5a38 100644 --- a/libnfc/drivers/pn532_spi.c +++ b/libnfc/drivers/pn532_spi.c @@ -255,7 +255,7 @@ pn532_spi_open(const nfc_context *context, const nfc_connstring connstring) } static int -pn532_spi_read_spi_status(nfc_device *pnd, int timeout) +pn532_spi_read_spi_status(nfc_device *pnd) { static const uint8_t pn532_spi_statread_cmd = 0x02; @@ -320,7 +320,7 @@ pn532_spi_wait_for_data(nfc_device *pnd, int timeout) int timer = 0; int ret; - while ((ret = pn532_spi_read_spi_status(pnd, timeout)) != pn532_spi_ready) { + while ((ret = pn532_spi_read_spi_status(pnd)) != pn532_spi_ready) { if (ret < 0) { return ret; }