virtio: console: Store each console's size in the console structure
authorAmit Shah <amit.shah@redhat.com>
Wed, 5 May 2010 20:35:08 +0000 (02:05 +0530)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 19 May 2010 12:45:51 +0000 (22:15 +0930)
commit9778829cffd4d8d68c7e457645f958a82d4c4d8b
tree3bf9ec66c8af66430b2aaf3d089d39c8b4338b30
parent4038f5b767a610c5a5d92d7047755c663ead1568
virtio: console: Store each console's size in the console structure

With support for multiple consoles, just using one {rows,cols} pair in
the config space is not going to suffice.

Store each console's size as part of the console struct.

This changes the behaviour for one case when multiport is not enabled:
when notifier_add_vio() is called, the console size is taken from that
of the last config-space update instead of fetching it afresh from the
config space.

Also add a helper to update the size in the console struct as we'll need
to use the same code to update the size via control messages when
multiport support is enabled.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
CC: Christian Borntraeger <borntraeger@de.ibm.com>
CC: linuxppc-dev@ozlabs.org
CC: Kusanagi Kouichi <slash@ac.auone-net.jp>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/char/virtio_console.c