counter: 104-quad-8: Add const qualifiers for quad8_preset_register_set
authorWilliam Breathitt Gray <vilhelm.gray@gmail.com>
Wed, 9 Jun 2021 01:31:09 +0000 (10:31 +0900)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 9 Jun 2021 15:18:59 +0000 (16:18 +0100)
Add some safety by qualifying the quad8_preset_register_set() function
parameters as const.

Acked-by: Syed Nayyar Waris <syednwaris@gmail.com>
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Link: https://lore.kernel.org/r/050f1b518eeae8e3683f7d6d11f3219a137adf48.1623201081.git.vilhelm.gray@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/counter/104-quad-8.c

index ae55a33..af7ffea 100644 (file)
@@ -632,8 +632,8 @@ static ssize_t quad8_count_preset_read(struct counter_device *counter,
        return sprintf(buf, "%u\n", priv->preset[count->id]);
 }
 
-static void quad8_preset_register_set(struct quad8 *priv, int id,
-                                     unsigned int preset)
+static void quad8_preset_register_set(struct quad8 *const priv, const int id,
+                                     const unsigned int preset)
 {
        const unsigned int base_offset = priv->base + 2 * id;
        int i;