• Guenter Roeck's avatar
    iio: Fix build error seen if IIO_TRIGGER is defined but IIO_BUFFER is not · 5a4d7291
    Guenter Roeck authored
    If CONFIG_IIO_TRIGGER is defined but CONFIG_IIO_BUFFER is not, the following
    build error is seen.
    
    drivers/iio/common/st_sensors/st_sensors_trigger.c:21:5: error:
    redefinition of ‘st_sensors_allocate_trigger’
    In file included from
    drivers/iio/common/st_sensors/st_sensors_trigger.c:18:0:
    include/linux/iio/common/st_sensors.h:239:19: note: previous
    definition of ‘st_sensors_allocate_trigger’ was here
    drivers/iio/common/st_sensors/st_sensors_trigger.c:65:6: error:
    redefinition of ‘st_sensors_deallocate_trigger’
    In file included from
    drivers/iio/common/st_sensors/st_sensors_trigger.c:18:0:
    include/linux/iio/common/st_sensors.h:244:20: note: previous
    definition of ‘st_sensors_deallocate_trigger’ was here
    
    This occurs because st_sensors_deallocate_trigger is built if CONFIG_IIO_TRIGGER
    is defined, but the dummy function is compiled if CONFIG_IIO_BUFFER is defined.
    Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
    Acked-by: default avatarDenis Ciocca <denis.ciocca@st.com>
    Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
    5a4d7291
st_sensors.h 8 KB