aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/sony-laptop.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-02-01 21:33:45 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-02-01 21:33:45 -0500
commit9d3f1881abeae0494a27716b08fcf2d3264bb0fa (patch)
treef457dd2d35af29bc831b93865efa47229d0b9bee /drivers/platform/x86/sony-laptop.c
parentb6c58b1d987a5795086c5c2babd8c7367d2fdb8c (diff)
parentbc10e875d4aeaa93a0d418d8b4346b72f5067ea0 (diff)
Merge branch 'sh/stable-updates'
Diffstat (limited to 'drivers/platform/x86/sony-laptop.c')
-rw-r--r--drivers/platform/x86/sony-laptop.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index 5af53340da6f..3f71a605a492 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -1201,9 +1201,12 @@ static void sony_nc_rfkill_setup(struct acpi_device *device)
1201 /* the buffer is filled with magic numbers describing the devices 1201 /* the buffer is filled with magic numbers describing the devices
1202 * available, 0xff terminates the enumeration 1202 * available, 0xff terminates the enumeration
1203 */ 1203 */
1204 while ((dev_code = *(device_enum->buffer.pointer + i)) != 0xff && 1204 for (i = 0; i < device_enum->buffer.length; i++) {
1205 i < device_enum->buffer.length) { 1205
1206 i++; 1206 dev_code = *(device_enum->buffer.pointer + i);
1207 if (dev_code == 0xff)
1208 break;
1209
1207 dprintk("Radio devices, looking at 0x%.2x\n", dev_code); 1210 dprintk("Radio devices, looking at 0x%.2x\n", dev_code);
1208 1211
1209 if (dev_code == 0 && !sony_rfkill_devices[SONY_WIFI]) 1212 if (dev_code == 0 && !sony_rfkill_devices[SONY_WIFI])