drivers: adc: adc_nrfx_saadc: remove redundant code

Remove redundant copy of error code and 0 initialization of static
m_data struct.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
This commit is contained in:
Bjarki Arge Andreasen 2024-07-11 09:16:01 +02:00 committed by Alberto Escolar
parent 13658a6687
commit bb2f49fb51

View file

@ -97,8 +97,6 @@ static struct driver_data m_data = {
ADC_CONTEXT_INIT_SYNC(m_data, ctx), ADC_CONTEXT_INIT_SYNC(m_data, ctx),
#if defined(ADC_BUFFER_IN_RAM) #if defined(ADC_BUFFER_IN_RAM)
.samples_buffer = adc_samples_buffer, .samples_buffer = adc_samples_buffer,
.user_buffer = NULL,
.active_channels = 0,
#endif #endif
}; };
@ -576,9 +574,7 @@ static int start_read(const struct device *dev,
adc_context_start_read(&m_data.ctx, sequence); adc_context_start_read(&m_data.ctx, sequence);
error = adc_context_wait_for_completion(&m_data.ctx); return adc_context_wait_for_completion(&m_data.ctx);
return error;
} }
/* Implementation of the ADC driver API function: adc_read. */ /* Implementation of the ADC driver API function: adc_read. */