summaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/spi.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2010-12-02 13:47:29 +0000
committerDavid S. Miller <davem@davemloft.net>2010-12-03 09:08:07 -0800
commit4de92180258ac661bbce0f0065c9c81633ac862b (patch)
treebb58aecb8e7e52dd2f95daa53ab263ccd98b9374 /drivers/net/sfc/spi.h
parent90b7a4ee610bf1d14120f5e0618ae2a3568394a5 (diff)
downloadlinux-4de92180258ac661bbce0f0065c9c81633ac862b.tar.gz
linux-4de92180258ac661bbce0f0065c9c81633ac862b.tar.bz2
linux-4de92180258ac661bbce0f0065c9c81633ac862b.zip
sfc: Move SPI state to struct falcon_nic_data
We only have direct access to SPI on Falcon, so move all this state out of struct efx_nic. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/spi.h')
-rw-r--r--drivers/net/sfc/spi.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/sfc/spi.h b/drivers/net/sfc/spi.h
index 8bf4fce0813a..879b7f6bde3d 100644
--- a/drivers/net/sfc/spi.h
+++ b/drivers/net/sfc/spi.h
@@ -61,6 +61,11 @@ struct efx_spi_device {
unsigned int block_size;
};
+static inline bool efx_spi_present(const struct efx_spi_device *spi)
+{
+ return spi->size != 0;
+}
+
int falcon_spi_cmd(struct efx_nic *efx,
const struct efx_spi_device *spi, unsigned int command,
int address, const void* in, void *out, size_t len);