]> git.karo-electronics.de Git - karo-tx-linux.git/commit
sony-laptop: fix SNC buffer calls when SN06 returns Integers
authorMattia Dongili <malattia@linux.it>
Thu, 20 Dec 2012 22:21:09 +0000 (07:21 +0900)
committerMatthew Garrett <matthew.garrett@nebula.com>
Wed, 26 Dec 2012 16:07:32 +0000 (11:07 -0500)
commit849d6e9f826f7416560694eccfeab4477335f312
tree8a091aa71a69628a975de38735bae9450c8eca77
parent6f0c8ad43071841e299692ac8003119980788012
sony-laptop: fix SNC buffer calls when SN06 returns Integers

SN06 in some cases returns an Integer instead of a buffer. While the
code handling the return value was trying to cope with the difference,
the memcpy call was not making any difference between the two types of
acpi_object union. This regression was introduced in 3.5.
While there also rework the return value logic to improve readability.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=48671
Cc: <stable@vger.kernel.org>
Cc: Fabrizio Narni <shibotto@gmail.com>
Cc: <mus.svz@gmail.com>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
drivers/platform/x86/sony-laptop.c