aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2009-06-12 04:26:30 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2009-06-12 04:27:32 -0400
commitfcf7581f7ca82e63e4e137be77c342a4e4ec8401 (patch)
tree1e6f4fc39518618feb849a500c424642982456cb /drivers/s390
parenta7c65a559ac371a08e67600ae585052441d71392 (diff)
[S390] 3270: do not register with tty_register_device
The tty3270_notifier that calls tty_register_device / tty_unregister_device is harmful in two ways: 1) the device node that is create is wrong because the minor numbers for 3270 tty start with 1 and tty_notifier passes the minor as index. 2) If 1) is corrected you'll get a warning: WARNING: at fs/sysfs/dir.c:462 sysfs_add_one+0x4c/0x60() sysfs: duplicate filename '227:1' can not be created The 227:1 link is already created by raw3270_create_attributes to refer to ../../class/tty/tty<devno>. There cannot be two links. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/char/tty3270.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c
index a7fe6302c982..aa7a114f6529 100644
--- a/drivers/s390/char/tty3270.c
+++ b/drivers/s390/char/tty3270.c
@@ -1754,14 +1754,6 @@ static const struct tty_operations tty3270_ops = {
1754 .set_termios = tty3270_set_termios 1754 .set_termios = tty3270_set_termios
1755}; 1755};
1756 1756
1757static void tty3270_notifier(int index, int active)
1758{
1759 if (active)
1760 tty_register_device(tty3270_driver, index, NULL);
1761 else
1762 tty_unregister_device(tty3270_driver, index);
1763}
1764
1765/* 1757/*
1766 * 3270 tty registration code called from tty_init(). 1758 * 3270 tty registration code called from tty_init().
1767 * Most kernel services (incl. kmalloc) are available at this poimt. 1759 * Most kernel services (incl. kmalloc) are available at this poimt.
@@ -1796,12 +1788,6 @@ static int __init tty3270_init(void)
1796 return ret; 1788 return ret;
1797 } 1789 }
1798 tty3270_driver = driver; 1790 tty3270_driver = driver;
1799 ret = raw3270_register_notifier(tty3270_notifier);
1800 if (ret) {
1801 put_tty_driver(driver);
1802 return ret;
1803
1804 }
1805 return 0; 1791 return 0;
1806} 1792}
1807 1793
@@ -1810,7 +1796,6 @@ tty3270_exit(void)
1810{ 1796{
1811 struct tty_driver *driver; 1797 struct tty_driver *driver;
1812 1798
1813 raw3270_unregister_notifier(tty3270_notifier);
1814 driver = tty3270_driver; 1799 driver = tty3270_driver;
1815 tty3270_driver = NULL; 1800 tty3270_driver = NULL;
1816 tty_unregister_driver(driver); 1801 tty_unregister_driver(driver);