diff --git a/drivers/sensors/gnss_uorb.c b/drivers/sensors/gnss_uorb.c index cef4b16650f42..4ca9e33ffc61a 100644 --- a/drivers/sensors/gnss_uorb.c +++ b/drivers/sensors/gnss_uorb.c @@ -49,7 +49,7 @@ #define GNSS_SATELLITE_IDX 1 #define GNSS_MEASUREMENT_IDX 2 #define GNSS_CLOCK_IDX 3 -#define GNSS_GEOFENCE 4 +#define GNSS_GEOFENCE_IDX 4 #define GNSS_MAX_IDX 5 #define GNSS_PARSE_BUFFERSIZE 256 @@ -680,7 +680,7 @@ static void gnss_push_event(FAR void *priv, FAR const void *data, } else if (type == SENSOR_TYPE_GNSS_GEOFENCE) { - lower = &upper->dev[GNSS_GEOFENCE].lower; + lower = &upper->dev[GNSS_GEOFENCE_IDX].lower; lower->push_event(lower->priv, data, bytes); } } @@ -797,7 +797,7 @@ int gnss_register(FAR struct gnss_lowerhalf_s *lower, int devno, /* GNSS Geofence */ - dev = &upper->dev[GNSS_GEOFENCE]; + dev = &upper->dev[GNSS_GEOFENCE_IDX]; dev->lower.ops = &g_gnss_sensor_ops; dev->lower.type = SENSOR_TYPE_GNSS_GEOFENCE; dev->lower.nbuffer = nbuffer; @@ -828,7 +828,7 @@ int gnss_register(FAR struct gnss_lowerhalf_s *lower, int devno, driver_err: circbuf_uninit(&upper->buffer); circ_err: - sensor_unregister(&upper->dev[GNSS_GEOFENCE].lower, devno); + sensor_unregister(&upper->dev[GNSS_GEOFENCE_IDX].lower, devno); gnss_geofence_err: sensor_unregister(&upper->dev[GNSS_CLOCK_IDX].lower, devno); gnss_clock_err: @@ -876,7 +876,7 @@ void gnss_unregister(FAR struct gnss_lowerhalf_s *lower, int devno) sensor_unregister(&upper->dev[GNSS_SATELLITE_IDX].lower, devno); sensor_unregister(&upper->dev[GNSS_MEASUREMENT_IDX].lower, devno); sensor_unregister(&upper->dev[GNSS_CLOCK_IDX].lower, devno); - sensor_unregister(&upper->dev[GNSS_GEOFENCE].lower, devno); + sensor_unregister(&upper->dev[GNSS_GEOFENCE_IDX].lower, devno); snprintf(path, PATH_MAX, GNSS_PATH_FMT, devno); unregister_driver(path); nxsem_destroy(&upper->buffersem);