iio: st_magn: always define ST_MAGN_TRIGGER_SET_STATE
authorArnd Bergmann <arnd@arndb.de>
Tue, 29 Mar 2016 20:27:27 +0000 (22:27 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 3 Apr 2016 09:56:42 +0000 (10:56 +0100)
commit9b090a98e95c2530ef0ce474e3b6218621b8ae25
treeef9cac2f4bd32aebd80c950f6f8d9760a15b6fdb
parent1bef2c1d4e4fd92bdf8219b13ba97ba861618254
iio: st_magn: always define ST_MAGN_TRIGGER_SET_STATE

When CONFIG_IIO_TRIGGER is enabled but CONFIG_IIO_BUFFER is
not, we get a build error in the st_magn driver:

drivers/iio/magnetometer/st_magn_core.c:573:23: error: 'ST_MAGN_TRIGGER_SET_STATE' undeclared here (not in a function)
  .set_trigger_state = ST_MAGN_TRIGGER_SET_STATE,
                       ^~~~~~~~~~~~~~~~~~~~~~~~~

Apparently, this ST_MAGN_TRIGGER_SET_STATE macro was meant to
be set to NULL when the definition is not available because
st_magn_buffer.c is not compiled, but the alternative definition
was not included in the original patch. This adds it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 74f5683f35fe ("iio: st_magn: Add irq trigger handling")
Acked-by: Denis Ciocca <denis.ciocca@st.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/magnetometer/st_magn.h
This page took 0.024729 seconds and 5 git commands to generate.