summaryrefslogtreecommitdiff
path: root/drivers/scsi/ufs/ufshcd.h
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2019-07-30 08:55:17 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2019-08-07 21:40:37 -0400
commit4b828fe156a662a4b6135019bf077040340f299b (patch)
treed2fd994b94b847cbc373a240ef81dfbd8ed6eebd /drivers/scsi/ufs/ufshcd.h
parentc72a9692923f67a0ba862093848d1834259e01c3 (diff)
scsi: ufs: revamp string descriptor reading
Define new a type: uc_string_id for easier string handling and less casting. Reduce number or string copies in price of a dynamic allocation. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Tested-by: Avri Altman <avri.altman@wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs/ufshcd.h')
-rw-r--r--drivers/scsi/ufs/ufshcd.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
index a43c7135f33d..9f61550abc7f 100644
--- a/drivers/scsi/ufs/ufshcd.h
+++ b/drivers/scsi/ufs/ufshcd.h
@@ -913,8 +913,11 @@ 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, bool *flag_res);
-int ufshcd_read_string_desc(struct ufs_hba *hba, int desc_index,
- u8 *buf, u32 size, bool ascii);
+
+#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);