[First try got blocked from platform-driver-x86 antispam filter]
On Fri, Apr 1, 2011 at 2:29 AM, Mattia Dongili <[email protected]> wrote:
Hi Alessandro,
I am under the impression that the SNC devices gets a notification early
during initialization when we still haven't read the available handles.
This patch should fix it but if my thoughts are incorrect then it may
break something else later.
Give it a try and let me know (it may apply with a little fuzz).
Also, could you try to load the module with and without the patch using
the parameter debug=1 ?
diff --git a/drivers/platform/x86/sony-laptop.c
b/drivers/platform/x86/sony-laptop.c
index cfe4493..bed6ebd 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -808,6 +808,11 @@ static int sony_nc_handles_cleanup(struct
platform_device *pd)
static int sony_find_snc_handle(int handle)
{
int i;
+
+ /* not initialized yet, return early */
+ if (!handles)
+ return -1;
+
for (i = 0; i < 0x10; i++) {
if (handles->cap[i] == handle) {
dprintk("found handle 0x%.4x (offset: 0x%.2x)\n",
It works, thanks!I've attached debug output from sony-laptop with and without the patch as you requested.
patched.dmesg
Description: Binary data
unpatched.dmesg
Description: Binary data
