scsi: ufs: sysfs: Make HID attributes visible

Call sysfs_update_group() after reading the device descriptor to ensure
the HID sysfs attributes are visible when the feature is supported.

Fixes: ae7795a8c258 ("scsi: ufs: core: Add HID support")
Signed-off-by: Daniel Lee <chullee@google.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by Daniel Lee and committed by Martin K. Petersen bb7663de 60cd16a3

+4 -1
+1 -1
drivers/ufs/core/ufs-sysfs.c
··· 1949 1949 return hba->dev_info.hid_sup ? attr->mode : 0; 1950 1950 } 1951 1951 1952 - static const struct attribute_group ufs_sysfs_hid_group = { 1952 + const struct attribute_group ufs_sysfs_hid_group = { 1953 1953 .name = "hid", 1954 1954 .attrs = ufs_sysfs_hid, 1955 1955 .is_visible = ufs_sysfs_hid_is_visible,
+1
drivers/ufs/core/ufs-sysfs.h
··· 14 14 15 15 extern const struct attribute_group ufs_sysfs_unit_descriptor_group; 16 16 extern const struct attribute_group ufs_sysfs_lun_attributes_group; 17 + extern const struct attribute_group ufs_sysfs_hid_group; 17 18 18 19 #endif
+2
drivers/ufs/core/ufshcd.c
··· 8480 8480 DEVICE_DESC_PARAM_EXT_UFS_FEATURE_SUP) & 8481 8481 UFS_DEV_HID_SUPPORT; 8482 8482 8483 + sysfs_update_group(&hba->dev->kobj, &ufs_sysfs_hid_group); 8484 + 8483 8485 model_index = desc_buf[DEVICE_DESC_PARAM_PRDCT_NAME]; 8484 8486 8485 8487 err = ufshcd_read_string_desc(hba, model_index,