summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2010-01-20 01:23:27 -0500
committerLen Brown <len.brown@intel.com>2010-01-20 01:23:27 -0500
commitbe6066f34c948ccf4adcc90bbeb1fd335d663303 (patch)
tree551d2cf4934e7101e2e668347d85f47663a77e7c /drivers/platform
parentb4cdd6ac4f9b73118542a5c4e796e6b9f287d0dd (diff)
parent7f07a605a3929d2d94dcbad8ccb7d280958d21f9 (diff)
downloadlinux-be6066f34c948ccf4adcc90bbeb1fd335d663303.tar.bz2
Merge branch 'misc' into release
Diffstat (limited to 'drivers/platform')
-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)
/* the buffer is filled with magic numbers describing the devices
* available, 0xff terminates the enumeration
*/
- while ((dev_code = *(device_enum->buffer.pointer + i)) != 0xff &&
- i < device_enum->buffer.length) {
- i++;
+ for (i = 0; i < device_enum->buffer.length; i++) {
+
+ dev_code = *(device_enum->buffer.pointer + i);
+ if (dev_code == 0xff)
+ break;
+
dprintk("Radio devices, looking at 0x%.2x\n", dev_code);
if (dev_code == 0 && !sony_rfkill_devices[SONY_WIFI])