diff --git a/lib/device/dev-io.c b/lib/device/dev-io.c index fde59df9e..7dbc462ab 100644 --- a/lib/device/dev-io.c +++ b/lib/device/dev-io.c @@ -212,7 +212,7 @@ static int _aligned_io(struct device_area *where, void *buffer, * Public functions *---------------------------------------------------------------*/ -int dev_get_size(struct device *dev, uint64_t *size) +int dev_get_size(const struct device *dev, uint64_t *size) { int fd; const char *name = dev_name(dev); diff --git a/lib/device/device.h b/lib/device/device.h index cc9dff4c7..2c93ca507 100644 --- a/lib/device/device.h +++ b/lib/device/device.h @@ -55,7 +55,7 @@ struct device_area { /* * All io should use these routines. */ -int dev_get_size(struct device *dev, uint64_t *size); +int dev_get_size(const struct device *dev, uint64_t *size); int dev_get_sectsize(struct device *dev, uint32_t *size); /* Use quiet version if device number could change e.g. when opening LV */