diff options
Diffstat (limited to 'drivers/tty/hvc/hvcs.c')
-rw-r--r-- | drivers/tty/hvc/hvcs.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c index cab5c7adf8e8..877635733952 100644 --- a/drivers/tty/hvc/hvcs.c +++ b/drivers/tty/hvc/hvcs.c | |||
@@ -330,12 +330,12 @@ static int hvcs_open(struct tty_struct *tty, struct file *filp); | |||
330 | static void hvcs_close(struct tty_struct *tty, struct file *filp); | 330 | static void hvcs_close(struct tty_struct *tty, struct file *filp); |
331 | static void hvcs_hangup(struct tty_struct * tty); | 331 | static void hvcs_hangup(struct tty_struct * tty); |
332 | 332 | ||
333 | static int __devinit hvcs_probe(struct vio_dev *dev, | 333 | static int hvcs_probe(struct vio_dev *dev, |
334 | const struct vio_device_id *id); | 334 | const struct vio_device_id *id); |
335 | static int __devexit hvcs_remove(struct vio_dev *dev); | 335 | static int hvcs_remove(struct vio_dev *dev); |
336 | static int __init hvcs_module_init(void); | 336 | static int __init hvcs_module_init(void); |
337 | static void __exit hvcs_module_exit(void); | 337 | static void __exit hvcs_module_exit(void); |
338 | static int __devinit hvcs_initialize(void); | 338 | static int hvcs_initialize(void); |
339 | 339 | ||
340 | #define HVCS_SCHED_READ 0x00000001 | 340 | #define HVCS_SCHED_READ 0x00000001 |
341 | #define HVCS_QUICK_READ 0x00000002 | 341 | #define HVCS_QUICK_READ 0x00000002 |
@@ -676,7 +676,7 @@ static int khvcsd(void *unused) | |||
676 | return 0; | 676 | return 0; |
677 | } | 677 | } |
678 | 678 | ||
679 | static struct vio_device_id hvcs_driver_table[] __devinitdata= { | 679 | static struct vio_device_id hvcs_driver_table[] = { |
680 | {"serial-server", "hvterm2"}, | 680 | {"serial-server", "hvterm2"}, |
681 | { "", "" } | 681 | { "", "" } |
682 | }; | 682 | }; |
@@ -756,7 +756,7 @@ static int hvcs_get_index(void) | |||
756 | return -1; | 756 | return -1; |
757 | } | 757 | } |
758 | 758 | ||
759 | static int __devinit hvcs_probe( | 759 | static int hvcs_probe( |
760 | struct vio_dev *dev, | 760 | struct vio_dev *dev, |
761 | const struct vio_device_id *id) | 761 | const struct vio_device_id *id) |
762 | { | 762 | { |
@@ -835,7 +835,7 @@ static int __devinit hvcs_probe( | |||
835 | return 0; | 835 | return 0; |
836 | } | 836 | } |
837 | 837 | ||
838 | static int __devexit hvcs_remove(struct vio_dev *dev) | 838 | static int hvcs_remove(struct vio_dev *dev) |
839 | { | 839 | { |
840 | struct hvcs_struct *hvcsd = dev_get_drvdata(&dev->dev); | 840 | struct hvcs_struct *hvcsd = dev_get_drvdata(&dev->dev); |
841 | unsigned long flags; | 841 | unsigned long flags; |
@@ -874,7 +874,7 @@ static int __devexit hvcs_remove(struct vio_dev *dev) | |||
874 | static struct vio_driver hvcs_vio_driver = { | 874 | static struct vio_driver hvcs_vio_driver = { |
875 | .id_table = hvcs_driver_table, | 875 | .id_table = hvcs_driver_table, |
876 | .probe = hvcs_probe, | 876 | .probe = hvcs_probe, |
877 | .remove = __devexit_p(hvcs_remove), | 877 | .remove = hvcs_remove, |
878 | .name = hvcs_driver_name, | 878 | .name = hvcs_driver_name, |
879 | }; | 879 | }; |
880 | 880 | ||
@@ -1478,7 +1478,7 @@ static void hvcs_free_index_list(void) | |||
1478 | hvcs_index_count = 0; | 1478 | hvcs_index_count = 0; |
1479 | } | 1479 | } |
1480 | 1480 | ||
1481 | static int __devinit hvcs_initialize(void) | 1481 | static int hvcs_initialize(void) |
1482 | { | 1482 | { |
1483 | int rc, num_ttys_to_alloc; | 1483 | int rc, num_ttys_to_alloc; |
1484 | 1484 | ||
@@ -1496,8 +1496,10 @@ static int __devinit hvcs_initialize(void) | |||
1496 | num_ttys_to_alloc = hvcs_parm_num_devs; | 1496 | num_ttys_to_alloc = hvcs_parm_num_devs; |
1497 | 1497 | ||
1498 | hvcs_tty_driver = alloc_tty_driver(num_ttys_to_alloc); | 1498 | hvcs_tty_driver = alloc_tty_driver(num_ttys_to_alloc); |
1499 | if (!hvcs_tty_driver) | 1499 | if (!hvcs_tty_driver) { |
1500 | mutex_unlock(&hvcs_init_mutex); | ||
1500 | return -ENOMEM; | 1501 | return -ENOMEM; |
1502 | } | ||
1501 | 1503 | ||
1502 | if (hvcs_alloc_index_list(num_ttys_to_alloc)) { | 1504 | if (hvcs_alloc_index_list(num_ttys_to_alloc)) { |
1503 | rc = -ENOMEM; | 1505 | rc = -ENOMEM; |