]> git.baikalelectronics.ru Git - kernel.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)
commit064d3f5a3f6fda8c9200109dc00e2ba13bb1f0aa
tree61d08ee7a9960c266eb10e223084ea9bf873346a
parenta33c5d0269df1430ee1861e9fea1ecdec90ceab0
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