Thread (8 messages) 8 messages, 5 authors, 2012-12-07

Re: [PATCH 2/2] tty: serial core: use the ACPI PM state defines

From: Alan Cox <hidden>
Date: 2012-12-06 19:28:58
Also in: linux-acpi

On Thu, 6 Dec 2012 19:46:52 +0100
Linus Walleij [off-list ref] wrote:
From: Linus Walleij <redacted>

The Documentation/serial/driver file defines that:

  State indicates the new state (defined by ACPI D0-D3),
  oldstate indicates the previous state.  Essentially, D0
  means fully on, D3 means powered down.

So let's change the code to actually using the defined ACPI
states instead of using magic numbers.
The "magic numbers" being "1" to mean one, "2" to mean two etc..

Almost none of the platforms using the serial driver even have ACPI so
this seems to be an obfuscation of a simple numbering system for a
subsystem specific set of definitions that may or may not fit in future.

What are you going to do if it turns out serial ports on some platform
have a state that doesn't fit ACPI_STATE_foo because its got a
behaviour that isn't in the ACPI specification ?

This seems to be tying stuff together in a way that will just cause
future pain.

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