sparc: Remove corresponding sysfs file on device remove
PATCH 1/2 sparc: Remove corresponding sysfs file on device remove
Signed-off-by James Clarke <[email protected]>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id2541
--- arch/sparc/kernel/vio.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/sparc/kernel/vio.c +6 -0
@@ -368,9 +368,15 @@ static void vio_remove(struct mdesc_handle *hp, u64 node) dev =device_find_child (&root_vdev->dev, (void *) node, vio_md_node_match);if (dev) { +struct vio_dev *vdev =to_vio_dev (dev); +printk (KERN_INFO "VIO: Removing device %s\n" ,dev_name (dev));device_unregister (dev); +if (vdev->dp) +sysfs_remove_file (&vdev->dev.kobj, + &dev_attr_obppath.attr); +put_device (dev); } }
Signature · 1 line
2.11.0