mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
176eb92774
Without CONFIG_OF, the of_match_node() helper does not evaluate its
argument, and the compiler warns about the unused variable:
drivers/scsi/ufs/ufs-hisi.c: In function 'ufs_hisi_probe':
drivers/scsi/ufs/ufs-hisi.c:673:17: error: unused variable 'dev' [-Werror=unused-variable]
Rework this code to pass the data directly, and while we're at it,
correctly handle the const pointers.
Fixes: 653fcb07d9
("scsi: ufs: Add HI3670 SoC UFS driver support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
42 lines
1.3 KiB
C
42 lines
1.3 KiB
C
/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 and
|
|
* only version 2 as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
*/
|
|
|
|
#ifndef UFSHCD_PLTFRM_H_
|
|
#define UFSHCD_PLTFRM_H_
|
|
|
|
#include "ufshcd.h"
|
|
|
|
int ufshcd_pltfrm_init(struct platform_device *pdev,
|
|
const struct ufs_hba_variant_ops *vops);
|
|
void ufshcd_pltfrm_shutdown(struct platform_device *pdev);
|
|
|
|
#ifdef CONFIG_PM
|
|
|
|
int ufshcd_pltfrm_suspend(struct device *dev);
|
|
int ufshcd_pltfrm_resume(struct device *dev);
|
|
int ufshcd_pltfrm_runtime_suspend(struct device *dev);
|
|
int ufshcd_pltfrm_runtime_resume(struct device *dev);
|
|
int ufshcd_pltfrm_runtime_idle(struct device *dev);
|
|
|
|
#else /* !CONFIG_PM */
|
|
|
|
#define ufshcd_pltfrm_suspend NULL
|
|
#define ufshcd_pltfrm_resume NULL
|
|
#define ufshcd_pltfrm_runtime_suspend NULL
|
|
#define ufshcd_pltfrm_runtime_resume NULL
|
|
#define ufshcd_pltfrm_runtime_idle NULL
|
|
|
|
#endif /* CONFIG_PM */
|
|
|
|
#endif /* UFSHCD_PLTFRM_H_ */
|