Commit e612b600 authored by William Breathitt Gray's avatar William Breathitt Gray Committed by Jonathan Cameron

counter: 104-quad-8: Add const qualifiers for quad8_preset_register_set

Add some safety by qualifying the quad8_preset_register_set() function
parameters as const.
Acked-by: default avatarSyed Nayyar Waris <syednwaris@gmail.com>
Signed-off-by: default avatarWilliam Breathitt Gray <vilhelm.gray@gmail.com>
Link: https://lore.kernel.org/r/050f1b518eeae8e3683f7d6d11f3219a137adf48.1623201081.git.vilhelm.gray@gmail.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent af383bb1
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment