diff options
Diffstat (limited to 'include/linux/spi')
-rw-r--r-- | include/linux/spi/spi.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 176f6e36dbf..e25fcae89d3 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -114,6 +114,17 @@ static inline void spi_set_ctldata(struct spi_device *spi, void *state) spi->controller_state = state; } +/* device driver data */ + +static inline void spi_set_drvdata(struct spi_device *spi, void *data) +{ + dev_set_drvdata(&spi->dev, data); +} + +static inline void *spi_get_drvdata(struct spi_device *spi) +{ + return dev_get_drvdata(&spi->dev); +} struct spi_message; |