diff --git a/sensor/hal/src/sensor_controller.c b/sensor/hal/src/sensor_controller.c index 2578019c3d..34a4a53e16 100644 --- a/sensor/hal/src/sensor_controller.c +++ b/sensor/hal/src/sensor_controller.c @@ -476,7 +476,7 @@ static int32_t SdcSensorActive(int32_t sensorId, bool enabled, int32_t rateLevel return HDF_SUCCESS; } -static int32_t GetSdcSensorInfo(struct SdcSensorInfo[] &sdcSensorInfos) +static int32_t GetSdcSensorInfo(struct SdcSensorInfo[] *sdcSensorInfos) { (void)sdcSensorInfos; return HDF_SUCCESS; diff --git a/sensor/hdi_impl/sensor_impl.cpp b/sensor/hdi_impl/sensor_impl.cpp index 9a3954eb55..d8d3cf7203 100644 --- a/sensor/hdi_impl/sensor_impl.cpp +++ b/sensor/hdi_impl/sensor_impl.cpp @@ -350,7 +350,7 @@ int32_t SensorImpl::GetSdcSensorInfo(std::vector& sdcSensorInf StartTrace(HITRACE_TAG_SENSORS, "GetSdcSensorInfo"); struct SdcSensorInfo[] sdcSensorInfos; - int32_t ret = sensorInterface->GetSdcSensorInfo(sdcSensorInfos); + int32_t ret = sensorInterface->GetSdcSensorInfo(&sdcSensorInfos); FinishTrace(HITRACE_TAG_SENSORS); if (ret != SENSOR_SUCCESS) { HDF_LOGE("%{public}s failed, error code is %{public}d", __func__, ret); diff --git a/sensor/interfaces/include/sensor_if.h b/sensor/interfaces/include/sensor_if.h index 1b26e6be3d..a3d01156c7 100644 --- a/sensor/interfaces/include/sensor_if.h +++ b/sensor/interfaces/include/sensor_if.h @@ -203,7 +203,7 @@ struct SensorInterface { * @since 4.1 * @version 2.0 */ - int32_t (*GetSdcSensorInfo)(struct SdcSensorInfo[] &sdcSensorInfos); + int32_t (*GetSdcSensorInfo)(struct SdcSensorInfo[] *sdcSensorInfos); }; /**