Thread (11 messages) 11 messages, 5 authors, 2017-09-29

Re: [RFC 1/3] serdev: Add ACPI support

From: Rob Herring <robh@kernel.org>
Date: 2017-09-07 17:54:36
Also in: linux-acpi, linux-serial

On Thu, Sep 7, 2017 at 12:21 PM, Marcel Holtmann [off-list ref] wrot=
e:
Hi Fred,
quoted
Signed-off-by: Fr=C3=A9d=C3=A9ric Danis <redacted>
---
drivers/tty/serdev/core.c | 99 +++++++++++++++++++++++++++++++++++++++++=
+++---
quoted
1 file changed, 94 insertions(+), 5 deletions(-)
[...]
quoted
@@ -404,9 +488,14 @@ int serdev_controller_add(struct serdev_controller =
*ctrl)
quoted
      if (ret)
              return ret;

-     ret =3D of_serdev_register_devices(ctrl);
-     if (ret)
+     ret_of =3D of_serdev_register_devices(ctrl);
+     ret_acpi =3D acpi_serdev_register_devices(ctrl);
+     if (ret_of && ret_acpi) {
+             dev_dbg(&ctrl->dev, "serdev%d no devices registered: of:%d=
 acpi:%d\n",
quoted
+                     ctrl->nr, ret_of, ret_acpi);
+             ret =3D -ENODEV;
              goto out_dev_del;
+     }

      dev_dbg(&ctrl->dev, "serdev%d registered: dev:%p\n",
              ctrl->nr, &ctrl->dev);
Shouldn=E2=80=99t we just consider to always register the controller? Eve=
n if there are no devices attached to it.

You argued for the opposite at least in regards to a serdev ldisc. :)
The problem is we use the success or failure here to decide if we
create a tty char dev or not. I guess we could move that decision out
of the core and let the tty code check for devices and decide.

Rob
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help