aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/jsm/jsm_tty.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2005-04-16 18:25:44 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:25:44 -0400
commit614a7d6a76b7fb37bb399047eb3ccf86cafbf60d (patch)
treee7e85414691ef0f85509f1084c0cecc99f588418 /drivers/serial/jsm/jsm_tty.c
parenta299738283a654544c75167d190d9e87b77e5fb7 (diff)
[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 <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/serial/jsm/jsm_tty.c')
-rw-r--r--drivers/serial/jsm/jsm_tty.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/drivers/serial/jsm/jsm_tty.c b/drivers/serial/jsm/jsm_tty.c
index 7fb7cc07074b..24fe76c28833 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)
1012 1012
1013 return data_count; 1013 return data_count;
1014} 1014}
1015
1016static ssize_t jsm_driver_version_show(struct device_driver *ddp, char *buf)
1017{
1018 return snprintf(buf, PAGE_SIZE, "%s\n", JSM_VERSION);
1019}
1020static DRIVER_ATTR(version, S_IRUSR, jsm_driver_version_show, NULL);
1021
1022static ssize_t jsm_driver_state_show(struct device_driver *ddp, char *buf)
1023{
1024 return snprintf(buf, PAGE_SIZE, "%s\n", jsm_driver_state_text[jsm_driver_state]);
1025}
1026static DRIVER_ATTR(state, S_IRUSR, jsm_driver_state_show, NULL);
1027
1028void jsm_create_driver_sysfiles(struct device_driver *driverfs)
1029{
1030 driver_create_file(driverfs, &driver_attr_version);
1031 driver_create_file(driverfs, &driver_attr_state);
1032}
1033
1034void jsm_remove_driver_sysfiles(struct device_driver *driverfs)
1035{
1036 driver_remove_file(driverfs, &driver_attr_version);
1037 driver_remove_file(driverfs, &driver_attr_state);
1038}