sony: fix rfkill code
authorJohannes Berg <johannes@sipsolutions.net>
Sun, 7 Jun 2009 19:57:08 +0000 (21:57 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 10 Jun 2009 17:27:55 +0000 (13:27 -0400)
During the rfkill conversion I added code to call
sony_nc_rfkill_set with the wrong argument, causing
a segfault Reinette reported. The compiler could not
catch that because the argument is, and needs to be,
void *.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reported-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/platform/x86/sony-laptop.c

index aec0b27fd774d9b090e6927e698668c8193f0af3..f2893443b31808b5eef1360fe096515b84b34bad 100644 (file)
@@ -1135,8 +1135,7 @@ static void sony_nc_rfkill_update()
 
                if (hwblock) {
                        if (rfkill_set_hw_state(sony_rfkill_devices[i], true))
-                               sony_nc_rfkill_set(sony_rfkill_devices[i],
-                                                  true);
+                               sony_nc_rfkill_set((void *)i, true);
                        continue;
                }