Commit 23b6d3c5 authored by Federico Vaga's avatar Federico Vaga

sw:drv: replace constant value with macro

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent e18aa050
......@@ -550,7 +550,7 @@ static int __fa_init(struct fa_dev *fa)
fa_writel(fa, fa->fa_adc_csr_base, &zfad_regs[ZFA_CTL_FMS_CMD],
FA100M14B4C_CMD_STOP);
/* Initialize channels to use 1V range */
for (i = 0; i < 4; ++i) {
for (i = 0; i < FA100M14B4C_NCHAN; ++i) {
fa_adc_range_set(fa, &zdev->cset->chan[i], FA100M14B4C_RANGE_1V);
/* reset channel offset */
fa->user_offset[i] = 0x8000;
......
......@@ -340,7 +340,7 @@ struct fa_dev {
unsigned int n_dma_err;
/* Configuration */
uint16_t user_offset[4]; /* one per channel */
uint16_t user_offset[FA100M14B4C_NCHAN]; /* one per channel */
uint16_t zero_offset[FA100M14B4C_NCHAN];
/* one-wire */
uint8_t ds18_id[8];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment