ANDROID: scsi: ufs: sysfs: fix up scsi/ufs merge problems.
When merging, the ufs_sysfs_add_nodes() function got merged incorrectly.
Pick the upstream version which fixes the build problems.
This moves the tracepoint out of the sysfs create function and puts it
where the call originated, as the hba structure is not known in the
sysfs create call.
Bug: 158050260
Cc: Jaegeuk Kim <jaegeuk@google.com>
Fixes: 0b0468f649 ("ANDROID: scsi: ufs: add a hook to add sysfs entries")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I875944bb95597f1df63f109684d053903b2282a0
This commit is contained in:
@@ -1253,19 +1253,17 @@ const struct attribute_group ufs_sysfs_lun_attributes_group = {
|
||||
.attrs = ufs_sysfs_lun_attributes,
|
||||
};
|
||||
|
||||
void ufs_sysfs_add_nodes(struct ufs_hba *hba)
|
||||
void ufs_sysfs_add_nodes(struct device *dev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = sysfs_create_groups(&hba->dev->kobj, ufs_sysfs_groups);
|
||||
ret = sysfs_create_groups(&dev->kobj, ufs_sysfs_groups);
|
||||
if (ret) {
|
||||
dev_err(hba->dev,
|
||||
dev_err(dev,
|
||||
"%s: sysfs groups creation failed (err = %d)\n",
|
||||
__func__, ret);
|
||||
return;
|
||||
}
|
||||
|
||||
trace_android_vh_ufs_update_sysfs(hba);
|
||||
}
|
||||
|
||||
void ufs_sysfs_remove_nodes(struct device *dev)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
struct device;
|
||||
|
||||
void ufs_sysfs_add_nodes(struct ufs_hba *hba);
|
||||
void ufs_sysfs_add_nodes(struct device *dev);
|
||||
void ufs_sysfs_remove_nodes(struct device *dev);
|
||||
|
||||
extern const struct attribute_group ufs_sysfs_unit_descriptor_group;
|
||||
|
||||
@@ -9793,7 +9793,8 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
|
||||
ufshcd_set_ufs_dev_active(hba);
|
||||
|
||||
async_schedule(ufshcd_async_scan, hba);
|
||||
ufs_sysfs_add_nodes(hba);
|
||||
ufs_sysfs_add_nodes(dev);
|
||||
trace_android_vh_ufs_update_sysfs(hba);
|
||||
|
||||
device_enable_async_suspend(dev);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user