Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9660ac70 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Jonathan Cameron
Browse files

iio: ad5064: Move bus write callbacks to #if protected sections



Move the SPI and I2C specific write callbacks to the respective
"#if IS_ENABLED(CONFIG_SPI_MASTER)" and "#if IS_ENABLED(CONFIG_I2C)"
protected sections of the code.

This fixes the following warning which occurs if CONFIG_I2C is not set:
	drivers/iio/dac/ad5064.c: In function ‘ad5064_i2c_write’:
	drivers/iio/dac/ad5064.c:132: error: implicit declaration of function ‘i2c_master_send’

And the follwing warning which occurs when CONFIG_SPI_MASTER is not set:
	drivers/iio/dac/ad5064.c:137: warning: ‘ad5064_spi_write’ defined but not used

Reported-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 3879089b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment