diff options
author | Milton Miller <miltonm@bga.com> | 2005-07-07 17:56:25 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-07 18:23:39 -0700 |
commit | 030ffad23fb28fc29608a3bc21f0c3b88bf28592 (patch) | |
tree | 8fe8a2e8615e25e985c5658687d38c5c0ce7a971 /drivers/char/hvc_vio.c | |
parent | acad9559f1054487292eb10d7bb81f256e9d8f2d (diff) | |
download | talos-op-linux-030ffad23fb28fc29608a3bc21f0c3b88bf28592.tar.gz talos-op-linux-030ffad23fb28fc29608a3bc21f0c3b88bf28592.zip |
[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>
Diffstat (limited to 'drivers/char/hvc_vio.c')
-rw-r--r-- | drivers/char/hvc_vio.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/char/hvc_vio.c b/drivers/char/hvc_vio.c index d2928f90ab51..430a2c284ad2 100644 --- a/drivers/char/hvc_vio.c +++ b/drivers/char/hvc_vio.c @@ -43,6 +43,11 @@ static struct vio_device_id hvc_driver_table[] __devinitdata = { }; 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 @@ static int __devinit hvc_vio_probe(struct vio_dev *vdev, 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 @@ static int hvc_find_vtys(void) continue; if (device_is_compatible(vty, "hvterm1")) { - hvc_instantiate(*vtermno, num_found); + hvc_instantiate(*vtermno, num_found, &hvc_get_put_ops); ++num_found; } } |