diff mbox series

[v2,1/3] scsi: ufs: core: Export ufshcd_dme_link_startup() helper

Message ID 1723089163-28983-2-git-send-email-shawn.lin@rock-chips.com (mailing list archive)
State New
Headers show
Series Init support for RK3576 UFS controller | expand

Commit Message

Shawn Lin Aug. 8, 2024, 3:52 a.m. UTC
Export it for host drivers.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

Changes in v2: None

 drivers/ufs/core/ufshcd.c | 4 +++-
 include/ufs/ufshcd.h      | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

Comments

Bart Van Assche Aug. 9, 2024, 6:27 p.m. UTC | #1
On 8/7/24 8:52 PM, Shawn Lin wrote:
> Export it for host drivers.

That's a very short patch description. Please explain in the patch
description why your host driver is the only host driver that needs to
call this function.

Thanks,

Bart.
diff mbox series

Patch

diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 8f4abc5..e09f004 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -4019,7 +4019,7 @@  static void ufshcd_host_memory_configure(struct ufs_hba *hba)
  *
  * Return: 0 on success, non-zero value on failure.
  */
-static int ufshcd_dme_link_startup(struct ufs_hba *hba)
+int ufshcd_dme_link_startup(struct ufs_hba *hba)
 {
 	struct uic_command uic_cmd = {
 		.command = UIC_CMD_DME_LINK_STARTUP,
@@ -4032,6 +4032,8 @@  static int ufshcd_dme_link_startup(struct ufs_hba *hba)
 			"dme-link-startup: error code %d\n", ret);
 	return ret;
 }
+EXPORT_SYMBOL_GPL(ufshcd_dme_link_startup);
+
 /**
  * ufshcd_dme_reset - UIC command for DME_RESET
  * @hba: per adapter instance
diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h
index cac0cdb..8bc28c1 100644
--- a/include/ufs/ufshcd.h
+++ b/include/ufs/ufshcd.h
@@ -1432,6 +1432,7 @@  int ufshcd_read_string_desc(struct ufs_hba *hba, u8 desc_index,
 void ufshcd_hold(struct ufs_hba *hba);
 void ufshcd_release(struct ufs_hba *hba);
 
+int ufshcd_dme_link_startup(struct ufs_hba *hba);
 void ufshcd_clkgate_delay_set(struct device *dev, unsigned long value);
 
 int ufshcd_get_vreg(struct device *dev, struct ufs_vreg *vreg);