Skip to content

Commit ef138c7

Browse files
committed
chardev: enable modules, use for braille
Removes brlapi library dependency from core qemu. Signed-off-by: Gerd Hoffmann <[email protected]> Message-id: [email protected]
1 parent 8d5a24c commit ef138c7

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

Makefile.objs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ common-obj-$(CONFIG_TPM) += tpm.o
7171

7272
common-obj-y += backends/
7373
common-obj-y += chardev/
74+
common-obj-m += chardev/
7475

7576
common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o
7677
qemu-seccomp.o-cflags := $(SECCOMP_CFLAGS)

chardev/Makefile.objs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ chardev-obj-$(CONFIG_WIN32) += char-win.o
1818
chardev-obj-$(CONFIG_WIN32) += char-win-stdio.o
1919

2020
common-obj-y += msmouse.o wctablet.o testdev.o
21-
common-obj-$(CONFIG_BRLAPI) += baum.o
21+
22+
ifeq ($(CONFIG_BRLAPI),y)
23+
common-obj-m += baum.o
2224
baum.o-cflags := $(SDL_CFLAGS)
2325
baum.o-libs := $(BRLAPI_LIBS)
26+
endif
2427

2528
common-obj-$(CONFIG_SPICE) += spice.o

chardev/char.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ static const ChardevClass *char_get_class(const char *driver, Error **errp)
527527
const ChardevClass *cc;
528528
char *typename = g_strdup_printf("chardev-%s", driver);
529529

530-
oc = object_class_by_name(typename);
530+
oc = module_object_class_by_name(typename);
531531
g_free(typename);
532532

533533
if (!object_class_dynamic_cast(oc, TYPE_CHARDEV)) {

util/module.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ static struct {
272272
{ "vhost-user-gpu-device", "hw-", "display-virtio-gpu" },
273273
{ "vhost-user-gpu-pci", "hw-", "display-virtio-gpu" },
274274
{ "vhost-user-vga", "hw-", "display-virtio-gpu" },
275+
{ "chardev-braille", "chardev-", "baum" },
275276
};
276277

277278
static bool module_loaded_qom_all;

0 commit comments

Comments
 (0)