From ad23ac52aa769dd285e9d353516e4705e7bd9e2b Mon Sep 17 00:00:00 2001 From: Subhash Jadavani Date: Tue, 25 Feb 2014 00:55:10 -0800 Subject: [PATCH] scsi: ufs-msm: probe UFS only if it is the boot device Boot device can be either UFS or eMMC which means if eMMC is the boot device, probing UFS device is not desirable as it's not going to be used after probing. Kernel command line parameter "android.bootdevice" tells the kernel about the boot device so look at this boot device parameter to know whether to probe UFS device or not. Change-Id: I053b9611088263cd8de64085754c00d082aec3ed [subhashj@codeaurora.org: resolved merge conflicts] Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufs-msm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/ufs/ufs-msm.c b/drivers/scsi/ufs/ufs-msm.c index cb098ec094bc..5af74aebea05 100644 --- a/drivers/scsi/ufs/ufs-msm.c +++ b/drivers/scsi/ufs/ufs-msm.c @@ -1022,6 +1022,9 @@ static int ufs_msm_init(struct ufs_hba *hba) struct device *dev = hba->dev; struct ufs_msm_host *host; + if (strlen(android_boot_dev) && strcmp(android_boot_dev, dev_name(dev))) + return -ENODEV; + host = devm_kzalloc(dev, sizeof(*host), GFP_KERNEL); if (!host) { err = -ENOMEM;