device-common: Do not enable UFS in builds booting from sdcard am: 4f6e7bf173 am: 5fa4deb79d

Original change: https://android-review.googlesource.com/c/device/linaro/dragonboard/+/3148436

Change-Id: I0374b4e0b46758bb34814db14de1b3924961c981
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/device-common.mk b/device-common.mk
index 960c2ae..e144ea3 100644
--- a/device-common.mk
+++ b/device-common.mk
@@ -20,9 +20,10 @@
 BOARD_DO_NOT_STRIP_VENDOR_RAMDISK_MODULES := true
 BOARD_DO_NOT_STRIP_GENERIC_RAMDISK_MODULES := true
 ifeq ($(TARGET_SDCARD_BOOT), true)
+  # Do not copy UFS kernel module in vendor_dlkm.img
   # UFS module filename varies from ufs_qcom.ko to ufs-qcom.ko across different kernel versions
-  BOARD_VENDOR_KERNEL_MODULES := $(wildcard $(TARGET_KERNEL_DIR)/ufs*qcom.ko)
-  BOARD_GENERIC_RAMDISK_KERNEL_MODULES := $(filter-out $(BOARD_VENDOR_KERNEL_MODULES),$(TARGET_MODS))
+  UFS_MODULE := $(wildcard $(TARGET_KERNEL_DIR)/ufs*qcom.ko)
+  BOARD_GENERIC_RAMDISK_KERNEL_MODULES := $(filter-out $(UFS_MODULE),$(TARGET_MODS))
 else ifeq ($(TARGET_USES_LMP), true)
     include device/linaro/dragonboard/shared/utils/dlkm_loader/vendor.modules.list.mk
     BOARD_VENDOR_KERNEL_MODULES := $(patsubst %,$(TARGET_KERNEL_DIR)/%,$(VENDOR_DLKM_KERNEL_MODULES_LIST))