]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
sony-laptop: improve SNC initialization and acpi notify callback code
authorMarco Chiappero <marco@absence.it>
Sat, 19 May 2012 13:35:48 +0000 (22:35 +0900)
committerMatthew Garrett <mjg@redhat.com>
Thu, 31 May 2012 18:29:34 +0000 (14:29 -0400)
commit5fe801a7427cb13c530af59e2b77b30d789d9b9a
tree61d08ee7a9960c266eb10e223084ea9bf873346a
parent9e1233792933bc9b64133c3b00f2f4ef8b02d1a2
sony-laptop: improve SNC initialization and acpi notify callback code

Loop through the list of SNC handles and run the proper initialization
function for each of the known handles. Also return void in function
where we are not checking the return value anyway.
For notifications we also know which handle is linked to the event and
the code becomes simpler to read with a switch rather than using
convoluted ifs.

[malattia@linux.it: Code reworked to merge the initialization code
improvements and the notify callback changes. Modified the code paths to
allow easier error exit paths.  Also fixed some missing break statements
and spelling mistakes.]

Signed-off-by: Marco Chiappero <marco@absence.it>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/platform/x86/sony-laptop.c