Skip to content

Commit 4f8572c

Browse files
aviscontikartben
authored andcommitted
sensor: lsm6dsv16x: fix building in rtio config
Fix build error which happens when LSM6DSV16X_STREAM=y and there are no lsm6dsv16x driver instances on i3c bus. Signed-off-by: Armando Visconti <armando.visconti@st.com>
1 parent ea1129e commit 4f8572c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/sensor/st/lsm6dsv16x/lsm6dsv16x_rtio_stream.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,9 @@ void lsm6dsv16x_submit_stream(const struct device *dev, struct rtio_iodev_sqe *i
222222
static void lsm6dsv16x_complete_op_cb(struct rtio *r, const struct rtio_sqe *sqe, void *arg)
223223
{
224224
const struct device *dev = arg;
225+
#if LSM6DSVXXX_ANY_INST_ON_BUS_STATUS_OKAY(i3c)
225226
const struct lsm6dsv16x_config *config = dev->config;
227+
#endif
226228
struct lsm6dsv16x_data *lsm6dsv16x = dev->data;
227229

228230
/*
@@ -238,9 +240,7 @@ static void lsm6dsv16x_complete_op_cb(struct rtio *r, const struct rtio_sqe *sqe
238240
static void lsm6dsv16x_read_fifo_cb(struct rtio *r, const struct rtio_sqe *sqe, void *arg)
239241
{
240242
const struct device *dev = arg;
241-
#if LSM6DSVXXX_ANY_INST_ON_BUS_STATUS_OKAY(i3c)
242243
const struct lsm6dsv16x_config *config = dev->config;
243-
#endif
244244
struct lsm6dsv16x_data *lsm6dsv16x = dev->data;
245245
struct gpio_dt_spec *irq_gpio = lsm6dsv16x->drdy_gpio;
246246
struct rtio_iodev *iodev = lsm6dsv16x->iodev;

0 commit comments

Comments
 (0)