[PATCH 04/11] staging: comedi: jr3_pci: rename 'channel' to 'block'

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

 



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@xxxxxxxxx>
---
 drivers/staging/comedi/drivers/jr3_pci.c | 10 +++++-----
 drivers/staging/comedi/drivers/jr3_pci.h |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c
index e8f0b08198d9..c26dc571cbeb 100644
--- a/drivers/staging/comedi/drivers/jr3_pci.c
+++ b/drivers/staging/comedi/drivers/jr3_pci.c
@@ -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",
diff --git a/drivers/staging/comedi/drivers/jr3_pci.h b/drivers/staging/comedi/drivers/jr3_pci.h
index b4d333d57185..ab40828df6ea 100644
--- a/drivers/staging/comedi/drivers/jr3_pci.h
+++ b/drivers/staging/comedi/drivers/jr3_pci.h
@@ -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];
 };
-- 
2.11.0

_______________________________________________
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