]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/scsi/ufs/ufshcd.c
Merge tag 'pci-v4.12-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
[karo-tx-linux.git] / drivers / scsi / ufs / ufshcd.c
index abc7e87937cc3087617ca404dc73b01b39ff7822..ffe8d86088181c7da9c30ad58986418842f7016d 100644 (file)
@@ -7698,6 +7698,12 @@ static inline void ufshcd_add_sysfs_nodes(struct ufs_hba *hba)
        ufshcd_add_spm_lvl_sysfs_nodes(hba);
 }
 
+static inline void ufshcd_remove_sysfs_nodes(struct ufs_hba *hba)
+{
+       device_remove_file(hba->dev, &hba->rpm_lvl_attr);
+       device_remove_file(hba->dev, &hba->spm_lvl_attr);
+}
+
 /**
  * ufshcd_shutdown - shutdown routine
  * @hba: per adapter instance
@@ -7735,6 +7741,7 @@ EXPORT_SYMBOL(ufshcd_shutdown);
  */
 void ufshcd_remove(struct ufs_hba *hba)
 {
+       ufshcd_remove_sysfs_nodes(hba);
        scsi_remove_host(hba->host);
        /* disable interrupts */
        ufshcd_disable_intr(hba, hba->intr_mask);