Skip to content

Commit

Permalink
usb: core: sysfs: Unmerge @usb3_hardware_lpm_attr_group in remove_pow…
Browse files Browse the repository at this point in the history
…er_attributes()

commit 3a8839b upstream.

Device attribute group @usb3_hardware_lpm_attr_group is merged by
add_power_attributes(), but it is not unmerged explicitly, fixed by
unmerging it in remove_power_attributes().

Fixes: 655fe4e ("usbcore: add sysfs support to xHCI usb3 hardware LPM")
Cc: [email protected]
Signed-off-by: Zijun Hu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
zijun-hu authored and gregkh committed Sep 4, 2024
1 parent b0979a8 commit 0e9d60d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/core/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,7 @@ static int add_power_attributes(struct device *dev)

static void remove_power_attributes(struct device *dev)
{
sysfs_unmerge_group(&dev->kobj, &usb3_hardware_lpm_attr_group);
sysfs_unmerge_group(&dev->kobj, &usb2_hardware_lpm_attr_group);
sysfs_unmerge_group(&dev->kobj, &power_attr_group);
}
Expand Down

0 comments on commit 0e9d60d

Please sign in to comment.