Skip to content
Commit d6731819 authored by Fabio Baltieri's avatar Fabio Baltieri Committed by Christopher Friedt
Browse files

drivers: sx126x_standalone: use the correct dev_data for dio1 callback



The current code uses dev->data for finding back the instance data
structure in various places, but for the dio1 irq callback, dev refers
to the GPIO device node (not the LORA radio one), so dev->data returns a
pointer to the GPIO data rather than a "struct sx126x_data".

Fix that by using CONTAINER_OF to find back the correct structure from
the callback pointer.

The bug was introduced in:

  74efaa92 drivers: sx126x: refactor few functions for stm32wl support

Signed-off-by: default avatarFabio Baltieri <fabio.baltieri@gmail.com>
parent fc8dc623
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment