compat: lock correct mutex in device_lock