scsi: ufs: core: Convert to SCSI bus methods

The SCSI subsystem has implemented dedicated callbacks for probe, remove
and shutdown. Make use of them. This fixes a runtime warning about the
driver needing to be converted to the bus probe method.

Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/69f17c7d4f8f587e2a56e3ea268d441d98a6a895.1766133330.git.u.kleine-koenig@baylibre.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Uwe Kleine-König 2025-12-19 10:25:37 +01:00 committed by Martin K. Petersen
parent 4bc2205be4
commit 4485990537

View File

@ -10525,9 +10525,8 @@ int ufshcd_runtime_resume(struct device *dev)
EXPORT_SYMBOL(ufshcd_runtime_resume);
#endif /* CONFIG_PM */
static void ufshcd_wl_shutdown(struct device *dev)
static void ufshcd_wl_shutdown(struct scsi_device *sdev)
{
struct scsi_device *sdev = to_scsi_device(dev);
struct ufs_hba *hba = shost_priv(sdev->host);
down(&hba->host_sem);
@ -11133,9 +11132,9 @@ static int ufshcd_wl_poweroff(struct device *dev)
}
#endif
static int ufshcd_wl_probe(struct device *dev)
static int ufshcd_wl_probe(struct scsi_device *sdev)
{
struct scsi_device *sdev = to_scsi_device(dev);
struct device *dev = &sdev->sdev_gendev;
if (!is_device_wlun(sdev))
return -ENODEV;
@ -11147,10 +11146,11 @@ static int ufshcd_wl_probe(struct device *dev)
return 0;
}
static int ufshcd_wl_remove(struct device *dev)
static void ufshcd_wl_remove(struct scsi_device *sdev)
{
struct device *dev = &sdev->sdev_gendev;
pm_runtime_forbid(dev);
return 0;
}
static const struct dev_pm_ops ufshcd_wl_pm_ops = {
@ -11223,12 +11223,12 @@ static void ufshcd_check_header_layout(void)
* Hence register a scsi driver for ufs wluns only.
*/
static struct scsi_driver ufs_dev_wlun_template = {
.probe = ufshcd_wl_probe,
.remove = ufshcd_wl_remove,
.shutdown = ufshcd_wl_shutdown,
.gendrv = {
.name = "ufs_device_wlun",
.probe = ufshcd_wl_probe,
.remove = ufshcd_wl_remove,
.pm = &ufshcd_wl_pm_ops,
.shutdown = ufshcd_wl_shutdown,
},
};