diff mbox series

scsi: ufs: Make the TC G210 driver dependent on CONFIG_OF

Message ID 20230209184914.2762172-1-bvanassche@acm.org
State New
Headers show
Series scsi: ufs: Make the TC G210 driver dependent on CONFIG_OF | expand

Commit Message

Bart Van Assche Feb. 9, 2023, 6:49 p.m. UTC
The TC G210 driver only supports devices declared in the device tree.
Hence make this driver dependent on CONFIG_OF. This patch fixes the
following compiler error:

drivers/ufs/host/tc-dwc-g210-pltfrm.c:36:34: error: ‘tc_dwc_g210_pltfm_match’ defined but not used [-Werror=unused-const-variable=]
   36 | static const struct of_device_id tc_dwc_g210_pltfm_match[] = {
      |

Cc: Joao Pinto <jpinto@synopsys.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/ufs/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bean Huo Feb. 10, 2023, 2:23 p.m. UTC | #1
On 09.02.23 7:49 PM, Bart Van Assche wrote:
> The TC G210 driver only supports devices declared in the device tree.
> Hence make this driver dependent on CONFIG_OF. This patch fixes the
> following compiler error:
>
> drivers/ufs/host/tc-dwc-g210-pltfrm.c:36:34: error: ‘tc_dwc_g210_pltfm_match’ defined but not used [-Werror=unused-const-variable=]
>     36 | static const struct of_device_id tc_dwc_g210_pltfm_match[] = {
>        |
>
> Cc: Joao Pinto<jpinto@synopsys.com>
> Signed-off-by: Bart Van Assche<bvanassche@acm.org>

Reviewed-by: Bean Huo <beanhuo@micron.com>
Martin K. Petersen Feb. 21, 2023, 11:05 p.m. UTC | #2
Bart,

> The TC G210 driver only supports devices declared in the device tree.
> Hence make this driver dependent on CONFIG_OF. This patch fixes the
> following compiler error:

Applied to 6.3/scsi-staging, thanks!
diff mbox series

Patch

diff --git a/drivers/ufs/host/Kconfig b/drivers/ufs/host/Kconfig
index 139064e70a34..1cb28f9930dc 100644
--- a/drivers/ufs/host/Kconfig
+++ b/drivers/ufs/host/Kconfig
@@ -48,7 +48,7 @@  config SCSI_UFS_CDNS_PLATFORM
 
 config SCSI_UFS_DWC_TC_PLATFORM
 	tristate "DesignWare platform support using a G210 Test Chip"
-	depends on SCSI_UFSHCD_PLATFORM
+	depends on OF && SCSI_UFSHCD_PLATFORM
 	help
 	  Synopsys Test Chip is a PHY for prototyping purposes.