diff --git a/common/console.c b/common/console.c index e5f4267..c092621 100644 --- a/common/console.c +++ b/common/console.c @@ -64,6 +64,7 @@ struct console_device *cdev = to_console_dev(dev); char active[4]; unsigned int flag = 0, i = 0; + int ret; if (val) { if (strchr(val, 'i') && cdev->getc) { @@ -90,6 +91,12 @@ cdev->setbrg(cdev, cdev->baudrate); } + if (cdev->set_active) { + ret = cdev->set_active(cdev, flag); + if (ret) + return ret; + } + active[i] = 0; cdev->f_active = flag; diff --git a/include/console.h b/include/console.h index 97a406d..beafb4d 100644 --- a/include/console.h +++ b/include/console.h @@ -44,6 +44,7 @@ int (*setbrg)(struct console_device *cdev, int baudrate); void (*flush)(struct console_device *cdev); int (*set_mode)(struct console_device *cdev, enum console_mode mode); + int (*set_active)(struct console_device *cdev, unsigned active); char *devname;