[PATCH] hvc_console: Register ops when setting up hvc_console

When registering the hvc console port, register a list of ops (read and write)
to go with it, instead of calling fixed function names.

This allows different ports to encode the data differently.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
diff --git a/drivers/char/hvc_vio.c b/drivers/char/hvc_vio.c
index d2928f9..430a2c2 100644
--- a/drivers/char/hvc_vio.c
+++ b/drivers/char/hvc_vio.c
@@ -43,6 +43,11 @@
 };
 MODULE_DEVICE_TABLE(vio, hvc_driver_table);
 
+static struct hv_ops hvc_get_put_ops = {
+	.get_chars = hvc_get_chars,
+	.put_chars = hvc_put_chars,
+};
+
 static int __devinit hvc_vio_probe(struct vio_dev *vdev,
 				const struct vio_device_id *id)
 {
@@ -52,7 +57,7 @@
 	if (!vdev || !id)
 		return -EPERM;
 
-	hp = hvc_alloc(vdev->unit_address, vdev->irq);
+	hp = hvc_alloc(vdev->unit_address, vdev->irq, &hvc_get_put_ops);
 	if (IS_ERR(hp))
 		return PTR_ERR(hp);
 	dev_set_drvdata(&vdev->dev, hp);
@@ -115,7 +120,7 @@
 			continue;
 
 		if (device_is_compatible(vty, "hvterm1")) {
-			hvc_instantiate(*vtermno, num_found);
+			hvc_instantiate(*vtermno, num_found, &hvc_get_put_ops);
 			++num_found;
 		}
 	}