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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 6 Dec 2012 19:46:52 +0100
Linus Walleij <linus.walleij@xxxxxxxxxxxxxx> wrote:

> From: Linus Walleij <linus.walleij@xxxxxxxxxx>
> 
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux