Fix the inverted condition in mtx_asserts.

Mutex should be owned in affected functions.

Reborted by:	emaste
MFC after:	4 weeks
MFC with:	r366161
This commit is contained in:
Michal Meloun 2020-10-01 09:50:08 +00:00
parent 32fd57a8e1
commit c19440e350

View File

@ -95,7 +95,7 @@ syscon_generic_unlocked_read_4(struct syscon *syscon, bus_size_t offset)
uint32_t val;
sc = device_get_softc(syscon->pdev);
SYSCON_ASSERT_UNLOCKED(sc);
SYSCON_ASSERT_LOCKED(sc);
val = bus_read_4(sc->mem_res, offset);
return (val);
}
@ -106,7 +106,7 @@ syscon_generic_unlocked_write_4(struct syscon *syscon, bus_size_t offset, uint32
struct syscon_generic_softc *sc;
sc = device_get_softc(syscon->pdev);
SYSCON_ASSERT_UNLOCKED(sc);
SYSCON_ASSERT_LOCKED(sc);
bus_write_4(sc->mem_res, offset, val);
return (0);
}
@ -119,7 +119,7 @@ syscon_generic_unlocked_modify_4(struct syscon *syscon, bus_size_t offset,
uint32_t val;
sc = device_get_softc(syscon->pdev);
SYSCON_ASSERT_UNLOCKED(sc);
SYSCON_ASSERT_LOCKED(sc);
val = bus_read_4(sc->mem_res, offset);
val &= ~clear_bits;
val |= set_bits;