staging: comedi: jr3_pci: rename 'channel' to 'block'

The term "channel" is overloaded in this driver.  Rename the `channel`
member of `struct jr3_t` to `block` to reduce confusion.  `block` is an
array of an anonymous `struct` type, with each element covering the
registers for one subdevice.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Ian Abbott 2017-03-08 18:44:26 +00:00 committed by Greg Kroah-Hartman
parent ef3ab9f85c
commit 6c7f58084f
2 changed files with 6 additions and 6 deletions

View file

@ -405,8 +405,8 @@ static void jr3_write_firmware(struct comedi_device *dev,
unsigned int data1 = 0;
unsigned int data2 = 0;
lo = &iobase->channel[subdev].program_lo[addr];
hi = &iobase->channel[subdev].program_hi[addr];
lo = &iobase->block[subdev].program_lo[addr];
hi = &iobase->block[subdev].program_hi[addr];
more = more &&
read_idm_word(data, size, &pos, &data1);
@ -639,7 +639,7 @@ jr3_pci_alloc_spriv(struct comedi_device *dev, struct comedi_subdevice *s)
if (!spriv)
return NULL;
spriv->sensor = &iobase->channel[s->index].sensor;
spriv->sensor = &iobase->block[s->index].sensor;
for (j = 0; j < 8; j++) {
spriv->range[j].l.length = 1;
@ -671,7 +671,7 @@ jr3_pci_alloc_spriv(struct comedi_device *dev, struct comedi_subdevice *s)
static void jr3_pci_show_copyright(struct comedi_device *dev)
{
struct jr3_t __iomem *iobase = dev->mmio;
struct jr3_sensor __iomem *sensor0 = &iobase->channel[0].sensor;
struct jr3_sensor __iomem *sensor0 = &iobase->block[0].sensor;
char copy[ARRAY_SIZE(sensor0->copyright) + 1];
int i;
@ -744,7 +744,7 @@ static int jr3_pci_auto_attach(struct comedi_device *dev,
/* Reset DSP card */
for (i = 0; i < dev->n_subdevices; i++)
writel(0, &iobase->channel[i].reset);
writel(0, &iobase->block[i].reset);
ret = comedi_load_firmware(dev, &comedi_to_pci_dev(dev)->dev,
"comedi/jr3pci.idm",

View file

@ -732,5 +732,5 @@ struct jr3_t {
u32 program_hi[0x8000]; /* 0x40000 - 0x60000 */
u32 reset; /* 0x60000 - 0x60004 */
char pad3[0x20000 - 0x00004]; /* 0x60004 - 0x80000 */
} channel[4];
} block[4];
};