aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/virtio_console.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/virtio_console.c')
-rw-r--r--drivers/char/virtio_console.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 862fd54a0ffb..2a8d9a7a1834 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1837,12 +1837,8 @@ static void config_intr(struct virtio_device *vdev)
1837 struct port *port; 1837 struct port *port;
1838 u16 rows, cols; 1838 u16 rows, cols;
1839 1839
1840 vdev->config->get(vdev, 1840 virtio_cread(vdev, struct virtio_console_config, cols, &cols);
1841 offsetof(struct virtio_console_config, cols), 1841 virtio_cread(vdev, struct virtio_console_config, rows, &rows);
1842 &cols, sizeof(u16));
1843 vdev->config->get(vdev,
1844 offsetof(struct virtio_console_config, rows),
1845 &rows, sizeof(u16));
1846 1842
1847 port = find_port_by_id(portdev, 0); 1843 port = find_port_by_id(portdev, 0);
1848 set_console_size(port, rows, cols); 1844 set_console_size(port, rows, cols);
@@ -2014,10 +2010,9 @@ static int virtcons_probe(struct virtio_device *vdev)
2014 2010
2015 /* Don't test MULTIPORT at all if we're rproc: not a valid feature! */ 2011 /* Don't test MULTIPORT at all if we're rproc: not a valid feature! */
2016 if (!is_rproc_serial(vdev) && 2012 if (!is_rproc_serial(vdev) &&
2017 virtio_config_val(vdev, VIRTIO_CONSOLE_F_MULTIPORT, 2013 virtio_cread_feature(vdev, VIRTIO_CONSOLE_F_MULTIPORT,
2018 offsetof(struct virtio_console_config, 2014 struct virtio_console_config, max_nr_ports,
2019 max_nr_ports), 2015 &portdev->config.max_nr_ports) == 0) {
2020 &portdev->config.max_nr_ports) == 0) {
2021 multiport = true; 2016 multiport = true;
2022 } 2017 }
2023 2018