[PATCH 04/11] staging: comedi: jr3_pci: struct comedi_lrange should normally be const

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

 



Fix three checkpatch warnings of the form:

WARNING: struct comedi_lrange should normally be const

Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx>
---
 drivers/staging/comedi/drivers/jr3_pci.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c
index c5bff9a85727..d800a5e113ab 100644
--- a/drivers/staging/comedi/drivers/jr3_pci.c
+++ b/drivers/staging/comedi/drivers/jr3_pci.c
@@ -656,7 +656,7 @@ jr3_pci_alloc_spriv(struct comedi_device *dev, struct comedi_subdevice *s)
 
 		for (k = 0; k < 7; k++) {
 			spriv->range_table_list[j + k * 8] =
-				(struct comedi_lrange *)&spriv->range[j];
+				(const struct comedi_lrange *)&spriv->range[j];
 			spriv->maxdata_list[j + k * 8] = 0x7fff;
 		}
 	}
@@ -664,8 +664,10 @@ jr3_pci_alloc_spriv(struct comedi_device *dev, struct comedi_subdevice *s)
 	spriv->range[8].range.min = 0;
 	spriv->range[8].range.max = 65536;
 
-	spriv->range_table_list[56] = (struct comedi_lrange *)&spriv->range[8];
-	spriv->range_table_list[57] = (struct comedi_lrange *)&spriv->range[8];
+	spriv->range_table_list[56] =
+		(const struct comedi_lrange *)&spriv->range[8];
+	spriv->range_table_list[57] =
+		(const struct comedi_lrange *)&spriv->range[8];
 	spriv->maxdata_list[56] = 0xffff;
 	spriv->maxdata_list[57] = 0xffff;
 
-- 
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