Fix QC rebase issue for dual role sysfs access issue
As the USB hal service is the root user, so it is the same user as the dual role sysfs node, and it is OK to change the sysfs node access mode dynamicly for PD. Otherwise the sysfs node will lose sysfs node mode update. Revert "Revert "usb: phy: dual-role: update sysfs attrs when changed"" This reverts commit 4dabf448ae341dd492b45eb0f82fdd77ee5ef584. Change-Id: Id3651703b4e250ac6af6cb3dc94d3ca328a3a259 Reviewed-on: https://gerrit.mot.com/1257104 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Wentao Xu <xuwt2@motorola.com> Reviewed-by: Lu Chai <chailu1@motorola.com> Reviewed-by: Jianqi Yang <yangj@motorola.com> Submit-Approved: Jira Key Reviewed-on: https://gerrit.mot.com/1413206 Reviewed-by: Huosheng Liao <liaohs@motorola.com> Reviewed-on: https://gerrit.mot.com/1536373 Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
This commit is contained in:
1 parent
e9daf31317
commit
d1bb1a5c2c
1 file changed
+12
-9
@@ -70,15 +70,7 @@ static char *kstrdupcase(const char *str, gfp_t gfp, bool to_upper)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void dual_role_changed_work(struct work_struct *work)
|
||||
{
|
||||
struct dual_role_phy_instance *dual_role =
|
||||
container_of(work, struct dual_role_phy_instance,
|
||||
changed_work);
|
||||
|
||||
dev_dbg(&dual_role->dev, "%s\n", __func__);
|
||||
kobject_uevent(&dual_role->dev.kobj, KOBJ_CHANGE);
|
||||
}
|
||||
static void dual_role_changed_work(struct work_struct *work);
|
||||
|
||||
void dual_role_instance_changed(struct dual_role_phy_instance *dual_role)
|
||||
{
|
||||
@@ -505,6 +497,17 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void dual_role_changed_work(struct work_struct *work)
|
||||
{
|
||||
struct dual_role_phy_instance *dual_role =
|
||||
container_of(work, struct dual_role_phy_instance,
|
||||
changed_work);
|
||||
|
||||
dev_dbg(&dual_role->dev, "%s\n", __func__);
|
||||
sysfs_update_group(&dual_role->dev.kobj, &dual_role_attr_group);
|
||||
kobject_uevent(&dual_role->dev.kobj, KOBJ_CHANGE);
|
||||
}
|
||||
|
||||
/******************* Module Init ***********************************/
|
||||
|
||||
static int __init dual_role_class_init(void)
|
||||
|
||||
Reference in new issue
Block a user