@@ -652,7 +652,7 @@ int stm_is_locked(struct spi_flash *flash, u32 ofs, size_t len)
*
* Returns negative on errors, 0 on success.
*/
-int stm_lock(struct spi_flash *flash, u32 ofs, u32 len)
+int stm_lock(struct spi_flash *flash, u32 ofs, size_t len)
{
u8 status_old, status_new;
u8 mask = SR_BP2 | SR_BP1 | SR_BP0;
@@ -703,7 +703,7 @@ int stm_lock(struct spi_flash *flash, u32 ofs, u32 len)
*
* Returns negative on errors, 0 on success.
*/
-int stm_unlock(struct spi_flash *flash, u32 ofs, u32 len)
+int stm_unlock(struct spi_flash *flash, u32 ofs, size_t len)
{
uint8_t status_old, status_new;
u8 mask = SR_BP2 | SR_BP1 | SR_BP0;