aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc/misc-uclass.c
diff options
context:
space:
mode:
authorJohn Keeping2022-01-11 17:04:49 +0000
committerTom Rini2022-01-24 10:35:10 -0500
commite44d2f5df9baa9b604df4eaa4d42f89657170598 (patch)
treef87585b0a0c004dfb2ef1709bb9b2374ea3c39cb /drivers/misc/misc-uclass.c
parent6f08eee67fe93068ab501cc5f3094e480e76f4a9 (diff)
misc: mark write buffer const
The write operation in misc_ops already takes a "const void *" buffer, but misc_write() takes a mutable "void *". There's no reason for this, so make misc_write() consistent with the standard write() prototype. Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/misc/misc-uclass.c')
-rw-r--r--drivers/misc/misc-uclass.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/misc-uclass.c b/drivers/misc/misc-uclass.c
index cbfacc3801a..cfe9d562fa0 100644
--- a/drivers/misc/misc-uclass.c
+++ b/drivers/misc/misc-uclass.c
@@ -26,7 +26,7 @@ int misc_read(struct udevice *dev, int offset, void *buf, int size)
return ops->read(dev, offset, buf, size);
}
-int misc_write(struct udevice *dev, int offset, void *buf, int size)
+int misc_write(struct udevice *dev, int offset, const void *buf, int size)
{
const struct misc_ops *ops = device_get_ops(dev);