Thread (9 messages) 9 messages, 2 authors, 2023-02-01

Re: [PATCH 2/6] hvcs: Remove sysfs file prior to vio unregister

flat view

From: Greg KH <gregkh@linuxfoundation.org>
Date: 2023-02-01 20:07:00
Also in: linux-serial

On Wed, Feb 01, 2023 at 01:57:39PM -0600, Brian King wrote:
quoted hunk ↗ jump to hunk
This moves the removal of the rescan sysfs attribute to occur
before the call to unregister the vio to ensure the removal
does not fail due to the vio driver already being freed.

Signed-off-by: Brian King <redacted>
---
 drivers/tty/hvc/hvcs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index faf5ccfc561e..9131dcb2e8d8 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -1519,6 +1519,8 @@ static int __init hvcs_module_init(void)
 
 static void __exit hvcs_module_exit(void)
 {
+	driver_remove_file(&hvcs_vio_driver.driver, &driver_attr_rescan);
Again, set the default group for the driver and then you don't have to
do any of this at all please.

thanks,

greg k-h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help