aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/hvc/hvc_vio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/hvc/hvc_vio.c')
-rw-r--r--drivers/tty/hvc/hvc_vio.c29
1 files changed, 4 insertions, 25 deletions
diff --git a/drivers/tty/hvc/hvc_vio.c b/drivers/tty/hvc/hvc_vio.c
index f575a9b5ede7..b05dc5086627 100644
--- a/drivers/tty/hvc/hvc_vio.c
+++ b/drivers/tty/hvc/hvc_vio.c
@@ -41,7 +41,6 @@
41#include <linux/delay.h> 41#include <linux/delay.h>
42#include <linux/slab.h> 42#include <linux/slab.h>
43#include <linux/console.h> 43#include <linux/console.h>
44#include <linux/module.h>
45 44
46#include <asm/hvconsole.h> 45#include <asm/hvconsole.h>
47#include <asm/vio.h> 46#include <asm/vio.h>
@@ -61,7 +60,6 @@ static struct vio_device_id hvc_driver_table[] = {
61#endif 60#endif
62 { "", "" } 61 { "", "" }
63}; 62};
64MODULE_DEVICE_TABLE(vio, hvc_driver_table);
65 63
66typedef enum hv_protocol { 64typedef enum hv_protocol {
67 HV_PROTOCOL_RAW, 65 HV_PROTOCOL_RAW,
@@ -363,26 +361,13 @@ static int hvc_vio_probe(struct vio_dev *vdev,
363 return 0; 361 return 0;
364} 362}
365 363
366static int hvc_vio_remove(struct vio_dev *vdev)
367{
368 struct hvc_struct *hp = dev_get_drvdata(&vdev->dev);
369 int rc, termno;
370
371 termno = hp->vtermno;
372 rc = hvc_remove(hp);
373 if (rc == 0) {
374 if (hvterm_privs[termno] != &hvterm_priv0)
375 kfree(hvterm_privs[termno]);
376 hvterm_privs[termno] = NULL;
377 }
378 return rc;
379}
380
381static struct vio_driver hvc_vio_driver = { 364static struct vio_driver hvc_vio_driver = {
382 .id_table = hvc_driver_table, 365 .id_table = hvc_driver_table,
383 .probe = hvc_vio_probe, 366 .probe = hvc_vio_probe,
384 .remove = hvc_vio_remove,
385 .name = hvc_driver_name, 367 .name = hvc_driver_name,
368 .driver = {
369 .suppress_bind_attrs = true,
370 },
386}; 371};
387 372
388static int __init hvc_vio_init(void) 373static int __init hvc_vio_init(void)
@@ -394,13 +379,7 @@ static int __init hvc_vio_init(void)
394 379
395 return rc; 380 return rc;
396} 381}
397module_init(hvc_vio_init); /* after drivers/char/hvc_console.c */ 382device_initcall(hvc_vio_init); /* after drivers/tty/hvc/hvc_console.c */
398
399static void __exit hvc_vio_exit(void)
400{
401 vio_unregister_driver(&hvc_vio_driver);
402}
403module_exit(hvc_vio_exit);
404 383
405void __init hvc_vio_init_early(void) 384void __init hvc_vio_init_early(void)
406{ 385{