]> git.baikalelectronics.ru Git - kernel.git/commitdiff
scsi: ufs: Split the ufshcd.h header file
authorBart Van Assche <bvanassche@acm.org>
Tue, 19 Apr 2022 22:58:09 +0000 (15:58 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 26 Apr 2022 03:23:04 +0000 (23:23 -0400)
Split the ufshcd.h header file into a header file that defines the
interface used by UFS drivers and another header file with declarations and
data structures only used by the UFS core.

Link: https://lore.kernel.org/r/20220419225811.4127248-27-bvanassche@acm.org
Tested-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufs-debugfs.c
drivers/scsi/ufs/ufs-hwmon.c
drivers/scsi/ufs/ufs-sysfs.c
drivers/scsi/ufs/ufs_bsg.c
drivers/scsi/ufs/ufshcd-crypto.h
drivers/scsi/ufs/ufshcd-priv.h [new file with mode: 0644]
drivers/scsi/ufs/ufshcd.c
drivers/scsi/ufs/ufshcd.h
drivers/scsi/ufs/ufshpb.c

index 4a0bbcf1757aba823bfd15757b058386014d84dd..c10a8f09682b5f0c1f26b9d21359e31d42bb707e 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "ufs-debugfs.h"
 #include "ufshcd.h"
+#include "ufshcd-priv.h"
 
 static struct dentry *ufs_debugfs_root;
 
index 74855491dc8f6c76f6afb5a858bd5da5c69b115d..c38d9d98a86d0ab955301df540bf949bd9fb2ba6 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/units.h>
 
 #include "ufshcd.h"
+#include "ufshcd-priv.h"
 
 struct ufs_hwmon_data {
        struct ufs_hba *hba;
index 95a4e64ce40145a5414f6b35b153f302c58d5c29..8a3c6442f2911e09d2990e8058dfd3fd0132b9f2 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "ufs.h"
 #include "ufs-sysfs.h"
-#include "ufshcd.h"
+#include "ufshcd-priv.h"
 
 static const char *ufshcd_uic_link_state_to_string(
                        enum uic_link_state state)
index fbcdfb7135420ffbb22e555c2246d0209d3e856b..9e9b93867cab0f9c97c8378e1e5e2665c5fb75b4 100644 (file)
@@ -10,6 +10,7 @@
 #include <scsi/scsi_host.h>
 #include "ufs_bsg.h"
 #include "ufshcd.h"
+#include "ufshcd-priv.h"
 
 static int ufs_bsg_get_query_desc_size(struct ufs_hba *hba, int *desc_len,
                                       struct utp_upiu_query *qr)
index 57dd51256b57d6163cf881b979a54756e5cd97c7..9f98f18f964630f6217ad054fdbb8db2454d54b7 100644 (file)
@@ -8,6 +8,8 @@
 
 #include <scsi/scsi_cmnd.h>
 #include "ufshcd.h"
+#include "ufshcd-priv.h"
+#include "ufshci.h"
 
 #ifdef CONFIG_SCSI_UFS_CRYPTO
 
diff --git a/drivers/scsi/ufs/ufshcd-priv.h b/drivers/scsi/ufs/ufshcd-priv.h
new file mode 100644 (file)
index 0000000..3fa8ab9
--- /dev/null
@@ -0,0 +1,279 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#ifndef _UFSHCD_PRIV_H_
+#define _UFSHCD_PRIV_H_
+
+#include <linux/pm_runtime.h>
+#include "ufshcd.h"
+
+static inline bool ufshcd_is_user_access_allowed(struct ufs_hba *hba)
+{
+       return !hba->shutting_down;
+}
+
+void ufshcd_schedule_eh_work(struct ufs_hba *hba);
+
+static inline bool ufshcd_keep_autobkops_enabled_except_suspend(
+                                                       struct ufs_hba *hba)
+{
+       return hba->caps & UFSHCD_CAP_KEEP_AUTO_BKOPS_ENABLED_EXCEPT_SUSPEND;
+}
+
+static inline u8 ufshcd_wb_get_query_index(struct ufs_hba *hba)
+{
+       if (hba->dev_info.wb_buffer_type == WB_BUF_MODE_LU_DEDICATED)
+               return hba->dev_info.wb_dedicated_lu;
+       return 0;
+}
+
+#ifdef CONFIG_SCSI_UFS_HWMON
+void ufs_hwmon_probe(struct ufs_hba *hba, u8 mask);
+void ufs_hwmon_remove(struct ufs_hba *hba);
+void ufs_hwmon_notify_event(struct ufs_hba *hba, u8 ee_mask);
+#else
+static inline void ufs_hwmon_probe(struct ufs_hba *hba, u8 mask) {}
+static inline void ufs_hwmon_remove(struct ufs_hba *hba) {}
+static inline void ufs_hwmon_notify_event(struct ufs_hba *hba, u8 ee_mask) {}
+#endif
+
+int ufshcd_read_desc_param(struct ufs_hba *hba,
+                          enum desc_idn desc_id,
+                          int desc_index,
+                          u8 param_offset,
+                          u8 *param_read_buf,
+                          u8 param_size);
+int ufshcd_query_attr_retry(struct ufs_hba *hba, enum query_opcode opcode,
+                           enum attr_idn idn, u8 index, u8 selector,
+                           u32 *attr_val);
+int ufshcd_query_attr(struct ufs_hba *hba, enum query_opcode opcode,
+                     enum attr_idn idn, u8 index, u8 selector, u32 *attr_val);
+int ufshcd_query_flag(struct ufs_hba *hba, enum query_opcode opcode,
+       enum flag_idn idn, u8 index, bool *flag_res);
+void ufshcd_auto_hibern8_update(struct ufs_hba *hba, u32 ahit);
+
+#define SD_ASCII_STD true
+#define SD_RAW false
+int ufshcd_read_string_desc(struct ufs_hba *hba, u8 desc_index,
+                           u8 **buf, bool ascii);
+
+int ufshcd_hold(struct ufs_hba *hba, bool async);
+void ufshcd_release(struct ufs_hba *hba);
+
+void ufshcd_map_desc_id_to_length(struct ufs_hba *hba, enum desc_idn desc_id,
+                                 int *desc_length);
+
+int ufshcd_send_uic_cmd(struct ufs_hba *hba, struct uic_command *uic_cmd);
+
+int ufshcd_exec_raw_upiu_cmd(struct ufs_hba *hba,
+                            struct utp_upiu_req *req_upiu,
+                            struct utp_upiu_req *rsp_upiu,
+                            int msgcode,
+                            u8 *desc_buff, int *buff_len,
+                            enum query_opcode desc_op);
+
+int ufshcd_wb_toggle(struct ufs_hba *hba, bool enable);
+
+/* Wrapper functions for safely calling variant operations */
+static inline const char *ufshcd_get_var_name(struct ufs_hba *hba)
+{
+       if (hba->vops)
+               return hba->vops->name;
+       return "";
+}
+
+static inline void ufshcd_vops_exit(struct ufs_hba *hba)
+{
+       if (hba->vops && hba->vops->exit)
+               return hba->vops->exit(hba);
+}
+
+static inline u32 ufshcd_vops_get_ufs_hci_version(struct ufs_hba *hba)
+{
+       if (hba->vops && hba->vops->get_ufs_hci_version)
+               return hba->vops->get_ufs_hci_version(hba);
+
+       return ufshcd_readl(hba, REG_UFS_VERSION);
+}
+
+static inline int ufshcd_vops_clk_scale_notify(struct ufs_hba *hba,
+                       bool up, enum ufs_notify_change_status status)
+{
+       if (hba->vops && hba->vops->clk_scale_notify)
+               return hba->vops->clk_scale_notify(hba, up, status);
+       return 0;
+}
+
+static inline void ufshcd_vops_event_notify(struct ufs_hba *hba,
+                                           enum ufs_event_type evt,
+                                           void *data)
+{
+       if (hba->vops && hba->vops->event_notify)
+               hba->vops->event_notify(hba, evt, data);
+}
+
+static inline int ufshcd_vops_setup_clocks(struct ufs_hba *hba, bool on,
+                                       enum ufs_notify_change_status status)
+{
+       if (hba->vops && hba->vops->setup_clocks)
+               return hba->vops->setup_clocks(hba, on, status);
+       return 0;
+}
+
+static inline int ufshcd_vops_hce_enable_notify(struct ufs_hba *hba,
+                                               bool status)
+{
+       if (hba->vops && hba->vops->hce_enable_notify)
+               return hba->vops->hce_enable_notify(hba, status);
+
+       return 0;
+}
+static inline int ufshcd_vops_link_startup_notify(struct ufs_hba *hba,
+                                               bool status)
+{
+       if (hba->vops && hba->vops->link_startup_notify)
+               return hba->vops->link_startup_notify(hba, status);
+
+       return 0;
+}
+
+static inline int ufshcd_vops_pwr_change_notify(struct ufs_hba *hba,
+                                 enum ufs_notify_change_status status,
+                                 struct ufs_pa_layer_attr *dev_max_params,
+                                 struct ufs_pa_layer_attr *dev_req_params)
+{
+       if (hba->vops && hba->vops->pwr_change_notify)
+               return hba->vops->pwr_change_notify(hba, status,
+                                       dev_max_params, dev_req_params);
+
+       return -ENOTSUPP;
+}
+
+static inline void ufshcd_vops_setup_task_mgmt(struct ufs_hba *hba,
+                                       int tag, u8 tm_function)
+{
+       if (hba->vops && hba->vops->setup_task_mgmt)
+               return hba->vops->setup_task_mgmt(hba, tag, tm_function);
+}
+
+static inline void ufshcd_vops_hibern8_notify(struct ufs_hba *hba,
+                                       enum uic_cmd_dme cmd,
+                                       enum ufs_notify_change_status status)
+{
+       if (hba->vops && hba->vops->hibern8_notify)
+               return hba->vops->hibern8_notify(hba, cmd, status);
+}
+
+static inline int ufshcd_vops_apply_dev_quirks(struct ufs_hba *hba)
+{
+       if (hba->vops && hba->vops->apply_dev_quirks)
+               return hba->vops->apply_dev_quirks(hba);
+       return 0;
+}
+
+static inline void ufshcd_vops_fixup_dev_quirks(struct ufs_hba *hba)
+{
+       if (hba->vops && hba->vops->fixup_dev_quirks)
+               hba->vops->fixup_dev_quirks(hba);
+}
+
+static inline int ufshcd_vops_suspend(struct ufs_hba *hba, enum ufs_pm_op op,
+                               enum ufs_notify_change_status status)
+{
+       if (hba->vops && hba->vops->suspend)
+               return hba->vops->suspend(hba, op, status);
+
+       return 0;
+}
+
+static inline int ufshcd_vops_resume(struct ufs_hba *hba, enum ufs_pm_op op)
+{
+       if (hba->vops && hba->vops->resume)
+               return hba->vops->resume(hba, op);
+
+       return 0;
+}
+
+static inline void ufshcd_vops_dbg_register_dump(struct ufs_hba *hba)
+{
+       if (hba->vops && hba->vops->dbg_register_dump)
+               hba->vops->dbg_register_dump(hba);
+}
+
+static inline int ufshcd_vops_device_reset(struct ufs_hba *hba)
+{
+       if (hba->vops && hba->vops->device_reset)
+               return hba->vops->device_reset(hba);
+
+       return -EOPNOTSUPP;
+}
+
+static inline void ufshcd_vops_config_scaling_param(struct ufs_hba *hba,
+               struct devfreq_dev_profile *p,
+               struct devfreq_simple_ondemand_data *data)
+{
+       if (hba->vops && hba->vops->config_scaling_param)
+               hba->vops->config_scaling_param(hba, p, data);
+}
+
+extern struct ufs_pm_lvl_states ufs_pm_lvl_states[];
+
+/**
+ * ufshcd_scsi_to_upiu_lun - maps scsi LUN to UPIU LUN
+ * @scsi_lun: scsi LUN id
+ *
+ * Returns UPIU LUN id
+ */
+static inline u8 ufshcd_scsi_to_upiu_lun(unsigned int scsi_lun)
+{
+       if (scsi_is_wlun(scsi_lun))
+               return (scsi_lun & UFS_UPIU_MAX_UNIT_NUM_ID)
+                       | UFS_UPIU_WLUN_ID;
+       else
+               return scsi_lun & UFS_UPIU_MAX_UNIT_NUM_ID;
+}
+
+int __ufshcd_write_ee_control(struct ufs_hba *hba, u32 ee_ctrl_mask);
+int ufshcd_write_ee_control(struct ufs_hba *hba);
+int ufshcd_update_ee_control(struct ufs_hba *hba, u16 *mask, u16 *other_mask,
+                            u16 set, u16 clr);
+
+static inline int ufshcd_update_ee_drv_mask(struct ufs_hba *hba,
+                                           u16 set, u16 clr)
+{
+       return ufshcd_update_ee_control(hba, &hba->ee_drv_mask,
+                                       &hba->ee_usr_mask, set, clr);
+}
+
+static inline int ufshcd_update_ee_usr_mask(struct ufs_hba *hba,
+                                           u16 set, u16 clr)
+{
+       return ufshcd_update_ee_control(hba, &hba->ee_usr_mask,
+                                       &hba->ee_drv_mask, set, clr);
+}
+
+static inline int ufshcd_rpm_get_sync(struct ufs_hba *hba)
+{
+       return pm_runtime_get_sync(&hba->ufs_device_wlun->sdev_gendev);
+}
+
+static inline int ufshcd_rpm_put_sync(struct ufs_hba *hba)
+{
+       return pm_runtime_put_sync(&hba->ufs_device_wlun->sdev_gendev);
+}
+
+static inline void ufshcd_rpm_get_noresume(struct ufs_hba *hba)
+{
+       pm_runtime_get_noresume(&hba->ufs_device_wlun->sdev_gendev);
+}
+
+static inline int ufshcd_rpm_resume(struct ufs_hba *hba)
+{
+       return pm_runtime_resume(&hba->ufs_device_wlun->sdev_gendev);
+}
+
+static inline int ufshcd_rpm_put(struct ufs_hba *hba)
+{
+       return pm_runtime_put(&hba->ufs_device_wlun->sdev_gendev);
+}
+
+#endif /* _UFSHCD_PRIV_H_ */
index bac4ae63eb20c42234229ac15ef8e0d700abc441..12e02d6539900ab80f3ad7054005658267c3da70 100644 (file)
@@ -26,7 +26,7 @@
 #include <scsi/scsi_dbg.h>
 #include <scsi/scsi_driver.h>
 #include <scsi/scsi_eh.h>
-#include "ufshcd.h"
+#include "ufshcd-priv.h"
 #include "ufs_quirks.h"
 #include "unipro.h"
 #include "ufs-sysfs.h"
index ca36d8354f112a07b7460d35f538d26617f52f3f..2b0f3441b81381bc713a8216901f86f2b756ae18 100644 (file)
@@ -1005,11 +1005,6 @@ static inline bool ufshcd_is_wb_allowed(struct ufs_hba *hba)
        return hba->caps & UFSHCD_CAP_WB_EN;
 }
 
-static inline bool ufshcd_is_user_access_allowed(struct ufs_hba *hba)
-{
-       return !hba->shutting_down;
-}
-
 #define ufshcd_writel(hba, val, reg)   \
        writel((val), (hba)->mmio_base + (reg))
 #define ufshcd_readl(hba, reg) \
@@ -1073,28 +1068,6 @@ static inline void *ufshcd_get_variant(struct ufs_hba *hba)
        BUG_ON(!hba);
        return hba->priv;
 }
-static inline bool ufshcd_keep_autobkops_enabled_except_suspend(
-                                                       struct ufs_hba *hba)
-{
-       return hba->caps & UFSHCD_CAP_KEEP_AUTO_BKOPS_ENABLED_EXCEPT_SUSPEND;
-}
-
-static inline u8 ufshcd_wb_get_query_index(struct ufs_hba *hba)
-{
-       if (hba->dev_info.wb_buffer_type == WB_BUF_MODE_LU_DEDICATED)
-               return hba->dev_info.wb_dedicated_lu;
-       return 0;
-}
-
-#ifdef CONFIG_SCSI_UFS_HWMON
-void ufs_hwmon_probe(struct ufs_hba *hba, u8 mask);
-void ufs_hwmon_remove(struct ufs_hba *hba);
-void ufs_hwmon_notify_event(struct ufs_hba *hba, u8 ee_mask);
-#else
-static inline void ufs_hwmon_probe(struct ufs_hba *hba, u8 mask) {}
-static inline void ufs_hwmon_remove(struct ufs_hba *hba) {}
-static inline void ufs_hwmon_notify_event(struct ufs_hba *hba, u8 ee_mask) {}
-#endif
 
 #ifdef CONFIG_PM
 extern int ufshcd_runtime_suspend(struct device *dev);
@@ -1228,13 +1201,6 @@ int __ufshcd_suspend_prepare(struct device *dev, bool rpm_ok_for_spm);
 void ufshcd_resume_complete(struct device *dev);
 
 /* Wrapper functions for safely calling variant operations */
-static inline const char *ufshcd_get_var_name(struct ufs_hba *hba)
-{
-       if (hba->vops)
-               return hba->vops->name;
-       return "";
-}
-
 static inline int ufshcd_vops_init(struct ufs_hba *hba)
 {
        if (hba->vops && hba->vops->init)
@@ -1243,61 +1209,6 @@ static inline int ufshcd_vops_init(struct ufs_hba *hba)
        return 0;
 }
 
-static inline void ufshcd_vops_exit(struct ufs_hba *hba)
-{
-       if (hba->vops && hba->vops->exit)
-               return hba->vops->exit(hba);
-}
-
-static inline u32 ufshcd_vops_get_ufs_hci_version(struct ufs_hba *hba)
-{
-       if (hba->vops && hba->vops->get_ufs_hci_version)
-               return hba->vops->get_ufs_hci_version(hba);
-
-       return ufshcd_readl(hba, REG_UFS_VERSION);
-}
-
-static inline int ufshcd_vops_clk_scale_notify(struct ufs_hba *hba,
-                       bool up, enum ufs_notify_change_status status)
-{
-       if (hba->vops && hba->vops->clk_scale_notify)
-               return hba->vops->clk_scale_notify(hba, up, status);
-       return 0;
-}
-
-static inline void ufshcd_vops_event_notify(struct ufs_hba *hba,
-                                           enum ufs_event_type evt,
-                                           void *data)
-{
-       if (hba->vops && hba->vops->event_notify)
-               hba->vops->event_notify(hba, evt, data);
-}
-
-static inline int ufshcd_vops_setup_clocks(struct ufs_hba *hba, bool on,
-                                       enum ufs_notify_change_status status)
-{
-       if (hba->vops && hba->vops->setup_clocks)
-               return hba->vops->setup_clocks(hba, on, status);
-       return 0;
-}
-
-static inline int ufshcd_vops_hce_enable_notify(struct ufs_hba *hba,
-                                               bool status)
-{
-       if (hba->vops && hba->vops->hce_enable_notify)
-               return hba->vops->hce_enable_notify(hba, status);
-
-       return 0;
-}
-static inline int ufshcd_vops_link_startup_notify(struct ufs_hba *hba,
-                                               bool status)
-{
-       if (hba->vops && hba->vops->link_startup_notify)
-               return hba->vops->link_startup_notify(hba, status);
-
-       return 0;
-}
-
 static inline int ufshcd_vops_phy_initialization(struct ufs_hba *hba)
 {
        if (hba->vops && hba->vops->phy_initialization)
@@ -1306,102 +1217,8 @@ static inline int ufshcd_vops_phy_initialization(struct ufs_hba *hba)
        return 0;
 }
 
-static inline int ufshcd_vops_pwr_change_notify(struct ufs_hba *hba,
-                                 enum ufs_notify_change_status status,
-                                 struct ufs_pa_layer_attr *dev_max_params,
-                                 struct ufs_pa_layer_attr *dev_req_params)
-{
-       if (hba->vops && hba->vops->pwr_change_notify)
-               return hba->vops->pwr_change_notify(hba, status,
-                                       dev_max_params, dev_req_params);
-
-       return -ENOTSUPP;
-}
-
-static inline void ufshcd_vops_setup_task_mgmt(struct ufs_hba *hba,
-                                       int tag, u8 tm_function)
-{
-       if (hba->vops && hba->vops->setup_task_mgmt)
-               return hba->vops->setup_task_mgmt(hba, tag, tm_function);
-}
-
-static inline void ufshcd_vops_hibern8_notify(struct ufs_hba *hba,
-                                       enum uic_cmd_dme cmd,
-                                       enum ufs_notify_change_status status)
-{
-       if (hba->vops && hba->vops->hibern8_notify)
-               return hba->vops->hibern8_notify(hba, cmd, status);
-}
-
-static inline int ufshcd_vops_apply_dev_quirks(struct ufs_hba *hba)
-{
-       if (hba->vops && hba->vops->apply_dev_quirks)
-               return hba->vops->apply_dev_quirks(hba);
-       return 0;
-}
-
-static inline void ufshcd_vops_fixup_dev_quirks(struct ufs_hba *hba)
-{
-       if (hba->vops && hba->vops->fixup_dev_quirks)
-               hba->vops->fixup_dev_quirks(hba);
-}
-
-static inline int ufshcd_vops_suspend(struct ufs_hba *hba, enum ufs_pm_op op,
-                               enum ufs_notify_change_status status)
-{
-       if (hba->vops && hba->vops->suspend)
-               return hba->vops->suspend(hba, op, status);
-
-       return 0;
-}
-
-static inline int ufshcd_vops_resume(struct ufs_hba *hba, enum ufs_pm_op op)
-{
-       if (hba->vops && hba->vops->resume)
-               return hba->vops->resume(hba, op);
-
-       return 0;
-}
-
-static inline void ufshcd_vops_dbg_register_dump(struct ufs_hba *hba)
-{
-       if (hba->vops && hba->vops->dbg_register_dump)
-               hba->vops->dbg_register_dump(hba);
-}
-
-static inline int ufshcd_vops_device_reset(struct ufs_hba *hba)
-{
-       if (hba->vops && hba->vops->device_reset)
-               return hba->vops->device_reset(hba);
-
-       return -EOPNOTSUPP;
-}
-
-static inline void ufshcd_vops_config_scaling_param(struct ufs_hba *hba,
-               struct devfreq_dev_profile *p,
-               struct devfreq_simple_ondemand_data *data)
-{
-       if (hba->vops && hba->vops->config_scaling_param)
-               hba->vops->config_scaling_param(hba, p, data);
-}
-
 extern struct ufs_pm_lvl_states ufs_pm_lvl_states[];
 
-/**
- * ufshcd_scsi_to_upiu_lun - maps scsi LUN to UPIU LUN
- * @scsi_lun: scsi LUN id
- *
- * Returns UPIU LUN id
- */
-static inline u8 ufshcd_scsi_to_upiu_lun(unsigned int scsi_lun)
-{
-       if (scsi_is_wlun(scsi_lun))
-               return (scsi_lun & UFS_UPIU_MAX_UNIT_NUM_ID)
-                       | UFS_UPIU_WLUN_ID;
-       else
-               return scsi_lun & UFS_UPIU_MAX_UNIT_NUM_ID;
-}
-
 int ufshcd_dump_regs(struct ufs_hba *hba, size_t offset, size_t len,
                     const char *prefix);
 
@@ -1410,43 +1227,4 @@ int ufshcd_write_ee_control(struct ufs_hba *hba);
 int ufshcd_update_ee_control(struct ufs_hba *hba, u16 *mask, u16 *other_mask,
                             u16 set, u16 clr);
 
-static inline int ufshcd_update_ee_drv_mask(struct ufs_hba *hba,
-                                           u16 set, u16 clr)
-{
-       return ufshcd_update_ee_control(hba, &hba->ee_drv_mask,
-                                       &hba->ee_usr_mask, set, clr);
-}
-
-static inline int ufshcd_update_ee_usr_mask(struct ufs_hba *hba,
-                                           u16 set, u16 clr)
-{
-       return ufshcd_update_ee_control(hba, &hba->ee_usr_mask,
-                                       &hba->ee_drv_mask, set, clr);
-}
-
-static inline int ufshcd_rpm_get_sync(struct ufs_hba *hba)
-{
-       return pm_runtime_get_sync(&hba->ufs_device_wlun->sdev_gendev);
-}
-
-static inline int ufshcd_rpm_put_sync(struct ufs_hba *hba)
-{
-       return pm_runtime_put_sync(&hba->ufs_device_wlun->sdev_gendev);
-}
-
-static inline void ufshcd_rpm_get_noresume(struct ufs_hba *hba)
-{
-       pm_runtime_get_noresume(&hba->ufs_device_wlun->sdev_gendev);
-}
-
-static inline int ufshcd_rpm_resume(struct ufs_hba *hba)
-{
-       return pm_runtime_resume(&hba->ufs_device_wlun->sdev_gendev);
-}
-
-static inline int ufshcd_rpm_put(struct ufs_hba *hba)
-{
-       return pm_runtime_put(&hba->ufs_device_wlun->sdev_gendev);
-}
-
 #endif /* End of Header */
index 68c97a2e825c478b08e0432cb4735405b629e1b4..6e5237a041b5e41c67e974538935bc4faa5c3d9a 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/module.h>
 #include <scsi/scsi_cmnd.h>
 
-#include "ufshcd.h"
+#include "ufshcd-priv.h"
 #include "ufshpb.h"
 #include "../sd.h"