Re: [PATCH] staging: comedi: adv_pci1724: remove ao_range_list_1724

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2013-07-24 18:03, H Hartley Sweeten wrote:
All the AO channels have the same ranges. Remove the subdevice
s->range_table_list and just use the s->range_table to setup the
ranges.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
  drivers/staging/comedi/drivers/adv_pci1724.c | 6 +-----
  1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/comedi/drivers/adv_pci1724.c b/drivers/staging/comedi/drivers/adv_pci1724.c
index 84907c7..009a303 100644
--- a/drivers/staging/comedi/drivers/adv_pci1724.c
+++ b/drivers/staging/comedi/drivers/adv_pci1724.c
@@ -125,10 +125,6 @@ static const struct comedi_lrange ao_ranges_1724 = { 4,
  	}
  };

-static const struct comedi_lrange *const ao_range_list_1724[NUM_AO_CHANNELS] = {
-	[0 ... NUM_AO_CHANNELS - 1] = &ao_ranges_1724,
-};
-
  /* this structure is for data unique to this hardware driver. */
  struct adv_pci1724_private {
  	int ao_value[NUM_AO_CHANNELS];
@@ -308,7 +304,7 @@ static int setup_subdevices(struct comedi_device *dev)
  	s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_GROUND;
  	s->n_chan = NUM_AO_CHANNELS;
  	s->maxdata = 0x3fff;
-	s->range_table_list = ao_range_list_1724;
+	s->range_table = &ao_ranges_1724;
  	s->insn_read = ao_readback_insn;
  	s->insn_write = ao_winsn;

This was actually made into a range_table_list by me deliberately (see <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2013-February/035801.html> but that patch was part of a series of 13 patches that were later squashed into a single patch).

Reviewing the original rationale again, I'm no longer convinced that making is a range_table_list was justified. All the channels do have the same range table even though the selection of which ranges from that range table actually work as expected is decided on a per-channel basis by per-channel hardware jumpers (choosing between voltage output and current output per-channel).

So I'm happy for it to change back to a single range_table.

Reviewed-by: Ian Abbott <abbotti@xxxxxxxxx>

--
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@xxxxxxxxx>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux