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()

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 Aug 22, 2024
1 parent 4f83cae commit 3a8839b
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 @@ -670,6 +670,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 3a8839b

Please sign in to comment.