Merge "hal: Fix for hang during unloading of primary hal"