> +config SCSI_UFS_BSG
> +     bool "Universal Flash Storage BSG device node"

So this a bool,

>  obj-$(CONFIG_SCSI_UFSHCD_PCI) += ufshcd-pci.o
>  obj-$(CONFIG_SCSI_UFSHCD_PLATFORM) += ufshcd-pltfrm.o
>  obj-$(CONFIG_SCSI_UFS_HISI) += ufs-hisi.o
> +obj-$(CONFIG_SCSI_UFS_BSG) += ufs_bsg.o

But built as a separate module, which is rather odd.   I think
you wan to build this into the main ufshcd-core driver as a conditionally
compiled object instead.

> +
> +struct ufs_bsg {
> +     struct ufs_hba *hba;
> +     struct ufs_bsg_node *node;
> +};
> +static struct ufs_bsg *bsg_host;

This looks odd.  Why would you want a global variable like this?
I'd expect every ufs host to have a ufs_bsg_node, and in fact
we should probably just merge the ufs_bsg_node into the ufs_hba
structure.

Reply via email to