staging: comedi: jr3_pci: struct comedi_lrange should normally be const
authorIan Abbott <abbotti@mev.co.uk>
Fri, 17 Feb 2017 11:09:11 +0000 (11:09 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Mar 2017 08:16:58 +0000 (09:16 +0100)
Fix three checkpatch warnings of the form:

WARNING: struct comedi_lrange should normally be const

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/jr3_pci.c

index c5bff9a85727aab9aca17223d670df1739d9f3d7..d800a5e113abc8292056d88dd587fe563604dffe 100644 (file)
@@ -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;