From f9d78e00f391672efa0f39bb863c95cb2aff2044 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Mon, 17 Feb 2014 14:27:48 -0700 Subject: [PATCH] staging: comedi: pcl812: convert private data flags to bit-fields Convert the flags in the private data to bit-fields to save a bit of space. Rename the CamelCase 'use_MPC' member. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl812.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcl812.c b/drivers/staging/comedi/drivers/pcl812.c index 8728a90e543b..6e9d5f098d14 100644 --- a/drivers/staging/comedi/drivers/pcl812.c +++ b/drivers/staging/comedi/drivers/pcl812.c @@ -505,16 +505,10 @@ static const struct pcl812_board boardtypes[] = { struct pcl812_private { unsigned char dma; /* >0 use dma ( usedDMA channel) */ - unsigned char use_diff; /* =1 diff inputs */ - unsigned char use_MPC; /* 1=board uses MPC508A multiplexor */ - unsigned char use_ext_trg; /* 1=board uses external trigger */ unsigned char range_correction; /* =1 we must add 1 to range number */ unsigned char old_chan_reg; /* lastly used chan/gain pair */ unsigned char old_gain_reg; unsigned char mode_reg_int; /* there is stored INT number for some card */ - unsigned char ai_neverending; /* =1 we do unlimited AI */ - unsigned char ai_eos; /* 1=EOS wake up */ - unsigned char ai_dma; /* =1 we use DMA */ unsigned int ai_poll_ptr; /* how many sampes transfer poll */ unsigned int ai_act_scan; /* how many scans we finished */ unsigned int ai_data_len; /* len of data buffer */ @@ -530,6 +524,12 @@ struct pcl812_private { unsigned int ao_readback[2]; /* data for AO readback */ unsigned int divisor1; unsigned int divisor2; + unsigned int use_diff:1; + unsigned int use_mpc508:1; + unsigned int use_ext_trg:1; + unsigned int ai_dma:1; + unsigned int ai_eos:1; + unsigned int ai_neverending:1; }; static void setup_range_channel(struct comedi_device *dev, @@ -1104,7 +1104,7 @@ static void setup_range_channel(struct comedi_device *dev, devpriv->old_chan_reg = chan_reg; devpriv->old_gain_reg = gain_reg; - if (devpriv->use_MPC) { + if (devpriv->use_mpc508) { if (devpriv->use_diff) { chan_reg = chan_reg | 0x30; /* DIFF inputs */ } else { @@ -1380,7 +1380,7 @@ static int pcl812_attach(struct comedi_device *dev, struct comedi_devconfig *it) s->cancel = pcl812_ai_cancel; } - devpriv->use_MPC = board->has_mpc508_mux; + devpriv->use_mpc508 = board->has_mpc508_mux; subdev++; -- 2.30.2