From 614a7d6a76b7fb37bb399047eb3ccf86cafbf60d Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Sat, 16 Apr 2005 15:25:44 -0700 Subject: [PATCH] fix up newly added jsm driver - plug various leaks and use after frees in the remove and initialization failure path (some still left) - remove useless global list of boards and use pci_set_drvdata instead - unobsfucate init path by merging functions together - kill various totally useless state variables - .. probably more I forgot Note that the tty part still generates lots of sparse warnings and there's still a totally useless layer of function pointer indirections, but maybe someone else will fix that bit up. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/serial/jsm/jsm_tty.c | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'drivers/serial/jsm/jsm_tty.c') diff --git a/drivers/serial/jsm/jsm_tty.c b/drivers/serial/jsm/jsm_tty.c index 7fb7cc07074..24fe76c2883 100644 --- a/drivers/serial/jsm/jsm_tty.c +++ b/drivers/serial/jsm/jsm_tty.c @@ -1012,27 +1012,3 @@ int jsm_tty_write(struct uart_port *port) return data_count; } - -static ssize_t jsm_driver_version_show(struct device_driver *ddp, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%s\n", JSM_VERSION); -} -static DRIVER_ATTR(version, S_IRUSR, jsm_driver_version_show, NULL); - -static ssize_t jsm_driver_state_show(struct device_driver *ddp, char *buf) -{ - return snprintf(buf, PAGE_SIZE, "%s\n", jsm_driver_state_text[jsm_driver_state]); -} -static DRIVER_ATTR(state, S_IRUSR, jsm_driver_state_show, NULL); - -void jsm_create_driver_sysfiles(struct device_driver *driverfs) -{ - driver_create_file(driverfs, &driver_attr_version); - driver_create_file(driverfs, &driver_attr_state); -} - -void jsm_remove_driver_sysfiles(struct device_driver *driverfs) -{ - driver_remove_file(driverfs, &driver_attr_version); - driver_remove_file(driverfs, &driver_attr_state); -} -- cgit v1.2.3