Skip to content

Commit

Permalink
counter: 104-quad-8: Add const qualifiers for quad8_preset_register_set
Browse files Browse the repository at this point in the history
Add some safety by qualifying the quad8_preset_register_set() function
parameters as const.

Acked-by: Syed Nayyar Waris <[email protected]>
Signed-off-by: William Breathitt Gray <[email protected]>
Link: https://lore.kernel.org/r/050f1b518eeae8e3683f7d6d11f3219a137adf48.1623201081.git.vilhelm.gray@gmail.com
Signed-off-by: Jonathan Cameron <[email protected]>
  • Loading branch information
vilhelmgray authored and jic23 committed Jun 9, 2021
1 parent af383bb commit e612b60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/counter/104-quad-8.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e612b60

Please sign in to comment.