aboutsummaryrefslogtreecommitdiff
path: root/hw/misc/sifive_u_otp.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/misc/sifive_u_otp.c')
-rw-r--r--hw/misc/sifive_u_otp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/misc/sifive_u_otp.c b/hw/misc/sifive_u_otp.c
index f921c67644..b8e8b9eebe 100644
--- a/hw/misc/sifive_u_otp.c
+++ b/hw/misc/sifive_u_otp.c
@@ -228,7 +228,7 @@ static void sifive_u_otp_realize(DeviceState *dev, Error **errp)
if (s->blk) {
perm = BLK_PERM_CONSISTENT_READ |
- (blk_is_read_only(s->blk) ? 0 : BLK_PERM_WRITE);
+ (blk_supports_write_perm(s->blk) ? BLK_PERM_WRITE : 0);
ret = blk_set_perm(s->blk, perm, BLK_PERM_ALL, errp);
if (ret < 0) {
return;