summaryrefslogtreecommitdiff
path: root/drivers/counter
diff options
context:
space:
mode:
authorWilliam Breathitt Gray <vilhelm.gray@gmail.com>2021-06-09 10:31:09 +0900
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-06-09 16:18:59 +0100
commite612b600253e6d3f2f11315b3e59915403470dd3 (patch)
tree3c7a4548e5c0bf51c33efb0b79a4e330d5cbfdf3 /drivers/counter
parentaf383bb1467b9df1d845366579c368b3e66b9b06 (diff)
downloadlinux-e612b600253e6d3f2f11315b3e59915403470dd3.tar.gz
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: 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>
Diffstat (limited to 'drivers/counter')
-rw-r--r--drivers/counter/104-quad-8.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/counter/104-quad-8.c b/drivers/counter/104-quad-8.c
index ae55a338f678..af7ffea6ee12 100644
--- a/drivers/counter/104-quad-8.c
+++ b/drivers/counter/104-quad-8.c
@@ -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;