mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
ANDROID: scsi: ufs: Remove the ufs_rpmb_wlun_template
The upstream commit edc0596cc0 ("scsi: ufs: core: Stop clearing UNIT
ATTENTIONS") removed the ufs_rpmb_wlun_template but its Android backport
not. Hence this patch that removes the ufs_rpmb_wlun_template.
Bug: 204438323
Change-Id: I86206399a9745e26ad5f84c2cac2179a37ba80e7
Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
@@ -9694,10 +9694,6 @@ void ufshcd_resume_complete(struct device *dev)
|
||||
ufshcd_rpm_put(hba);
|
||||
hba->complete_put = false;
|
||||
}
|
||||
if (hba->rpmb_complete_put) {
|
||||
ufshcd_rpmb_rpm_put(hba);
|
||||
hba->rpmb_complete_put = false;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ufshcd_resume_complete);
|
||||
|
||||
@@ -9720,10 +9716,6 @@ int ufshcd_suspend_prepare(struct device *dev)
|
||||
}
|
||||
hba->complete_put = true;
|
||||
}
|
||||
if (hba->sdev_rpmb) {
|
||||
ufshcd_rpmb_rpm_get_sync(hba);
|
||||
hba->rpmb_complete_put = true;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ufshcd_suspend_prepare);
|
||||
@@ -9792,42 +9784,6 @@ static struct scsi_driver ufs_dev_wlun_template = {
|
||||
},
|
||||
};
|
||||
|
||||
static int ufshcd_rpmb_probe(struct device *dev)
|
||||
{
|
||||
return is_rpmb_wlun(to_scsi_device(dev)) ? 0 : -ENODEV;
|
||||
}
|
||||
|
||||
static inline int ufshcd_clear_rpmb_uac(struct ufs_hba *hba)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int ufshcd_rpmb_resume(struct device *dev)
|
||||
{
|
||||
struct ufs_hba *hba = wlun_dev_to_hba(dev);
|
||||
|
||||
if (hba->sdev_rpmb)
|
||||
ufshcd_clear_rpmb_uac(hba);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static const struct dev_pm_ops ufs_rpmb_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(NULL, ufshcd_rpmb_resume, NULL)
|
||||
SET_SYSTEM_SLEEP_PM_OPS(NULL, ufshcd_rpmb_resume)
|
||||
};
|
||||
|
||||
/* ufs_rpmb_wlun_template - Describes UFS RPMB WLUN. Used only to send UAC. */
|
||||
static struct scsi_driver ufs_rpmb_wlun_template = {
|
||||
.gendrv = {
|
||||
.name = "ufs_rpmb_wlun",
|
||||
.owner = THIS_MODULE,
|
||||
.probe = ufshcd_rpmb_probe,
|
||||
.pm = &ufs_rpmb_pm_ops,
|
||||
},
|
||||
};
|
||||
|
||||
static int __init ufshcd_core_init(void)
|
||||
{
|
||||
int ret;
|
||||
@@ -9836,24 +9792,13 @@ static int __init ufshcd_core_init(void)
|
||||
|
||||
ret = scsi_register_driver(&ufs_dev_wlun_template.gendrv);
|
||||
if (ret)
|
||||
goto debugfs_exit;
|
||||
|
||||
ret = scsi_register_driver(&ufs_rpmb_wlun_template.gendrv);
|
||||
if (ret)
|
||||
goto unregister;
|
||||
|
||||
return ret;
|
||||
unregister:
|
||||
scsi_unregister_driver(&ufs_dev_wlun_template.gendrv);
|
||||
debugfs_exit:
|
||||
ufs_debugfs_exit();
|
||||
ufs_debugfs_exit();
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void __exit ufshcd_core_exit(void)
|
||||
{
|
||||
ufs_debugfs_exit();
|
||||
scsi_unregister_driver(&ufs_rpmb_wlun_template.gendrv);
|
||||
scsi_unregister_driver(&ufs_dev_wlun_template.gendrv);
|
||||
}
|
||||
|
||||
|
||||
@@ -976,7 +976,6 @@ struct ufs_hba {
|
||||
#endif
|
||||
u32 luns_avail;
|
||||
bool complete_put;
|
||||
bool rpmb_complete_put;
|
||||
|
||||
ANDROID_KABI_RESERVE(1);
|
||||
ANDROID_KABI_RESERVE(2);
|
||||
@@ -1468,14 +1467,4 @@ static inline int ufshcd_rpm_put(struct ufs_hba *hba)
|
||||
return pm_runtime_put(&hba->sdev_ufs_device->sdev_gendev);
|
||||
}
|
||||
|
||||
static inline int ufshcd_rpmb_rpm_get_sync(struct ufs_hba *hba)
|
||||
{
|
||||
return pm_runtime_get_sync(&hba->sdev_rpmb->sdev_gendev);
|
||||
}
|
||||
|
||||
static inline int ufshcd_rpmb_rpm_put(struct ufs_hba *hba)
|
||||
{
|
||||
return pm_runtime_put(&hba->sdev_rpmb->sdev_gendev);
|
||||
}
|
||||
|
||||
#endif /* End of Header */
|
||||
|
||||
Reference in New Issue
Block a user