From 47ba9b528501273712b8e14bc1cb4c772fcfe9f2 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Fri, 17 Feb 2017 11:09:11 +0000 Subject: [PATCH] staging: comedi: jr3_pci: struct comedi_lrange should normally be const Fix three checkpatch warnings of the form: WARNING: struct comedi_lrange should normally be const Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- 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.30.2