diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2015-02-10 23:31:14 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2015-02-10 23:33:17 -0500 |
commit | be8ff5952a8d943660d3c01f1abf4e71eb565fdb (patch) | |
tree | f1f9f10049443136ae0427889c7d2ccbfd74583a /drivers/char/virtio_console.c | |
parent | 7abb568dbb32d055ec6a5633d26fb39fbcd525e3 (diff) |
virtio: don't require a config space on the console device.
Strictly, it's only needed when we have features (size or multiport).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/char/virtio_console.c')
-rw-r--r-- | drivers/char/virtio_console.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 26afb56a8073..fae2dbbf5745 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c | |||
@@ -1986,7 +1986,10 @@ static int virtcons_probe(struct virtio_device *vdev) | |||
1986 | bool multiport; | 1986 | bool multiport; |
1987 | bool early = early_put_chars != NULL; | 1987 | bool early = early_put_chars != NULL; |
1988 | 1988 | ||
1989 | if (!vdev->config->get) { | 1989 | /* We only need a config space if features are offered */ |
1990 | if (!vdev->config->get && | ||
1991 | (virtio_has_feature(vdev, VIRTIO_CONSOLE_F_SIZE) | ||
1992 | || virtio_has_feature(vdev, VIRTIO_CONSOLE_F_MULTIPORT))) { | ||
1990 | dev_err(&vdev->dev, "%s failure: config access disabled\n", | 1993 | dev_err(&vdev->dev, "%s failure: config access disabled\n", |
1991 | __func__); | 1994 | __func__); |
1992 | return -EINVAL; | 1995 | return -EINVAL; |