diff options
Diffstat (limited to 'drivers')
26 files changed, 91 insertions, 47 deletions
diff --git a/drivers/acpi/acpica/evxfevnt.c b/drivers/acpi/acpica/evxfevnt.c index d97b8dce1668..18b3f1468b7d 100644 --- a/drivers/acpi/acpica/evxfevnt.c +++ b/drivers/acpi/acpica/evxfevnt.c | |||
| @@ -70,6 +70,7 @@ acpi_ev_get_gpe_device(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | |||
| 70 | acpi_status acpi_enable(void) | 70 | acpi_status acpi_enable(void) |
| 71 | { | 71 | { |
| 72 | acpi_status status; | 72 | acpi_status status; |
| 73 | int retry; | ||
| 73 | 74 | ||
| 74 | ACPI_FUNCTION_TRACE(acpi_enable); | 75 | ACPI_FUNCTION_TRACE(acpi_enable); |
| 75 | 76 | ||
| @@ -98,16 +99,18 @@ acpi_status acpi_enable(void) | |||
| 98 | 99 | ||
| 99 | /* Sanity check that transition succeeded */ | 100 | /* Sanity check that transition succeeded */ |
| 100 | 101 | ||
| 101 | if (acpi_hw_get_mode() != ACPI_SYS_MODE_ACPI) { | 102 | for (retry = 0; retry < 30000; ++retry) { |
| 102 | ACPI_ERROR((AE_INFO, | 103 | if (acpi_hw_get_mode() == ACPI_SYS_MODE_ACPI) { |
| 103 | "Hardware did not enter ACPI mode")); | 104 | if (retry != 0) |
| 104 | return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE); | 105 | ACPI_WARNING((AE_INFO, |
| 106 | "Platform took > %d00 usec to enter ACPI mode", retry)); | ||
| 107 | return_ACPI_STATUS(AE_OK); | ||
| 108 | } | ||
| 109 | acpi_os_stall(100); /* 100 usec */ | ||
| 105 | } | 110 | } |
| 106 | 111 | ||
| 107 | ACPI_DEBUG_PRINT((ACPI_DB_INIT, | 112 | ACPI_ERROR((AE_INFO, "Hardware did not enter ACPI mode")); |
| 108 | "Transition to ACPI mode successful\n")); | 113 | return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE); |
| 109 | |||
| 110 | return_ACPI_STATUS(AE_OK); | ||
| 111 | } | 114 | } |
| 112 | 115 | ||
| 113 | ACPI_EXPORT_SYMBOL(acpi_enable) | 116 | ACPI_EXPORT_SYMBOL(acpi_enable) |
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 3026e3fa83ef..dc58402b0a17 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c | |||
| @@ -868,9 +868,15 @@ static void acpi_battery_remove_fs(struct acpi_device *device) | |||
| 868 | static void acpi_battery_notify(struct acpi_device *device, u32 event) | 868 | static void acpi_battery_notify(struct acpi_device *device, u32 event) |
| 869 | { | 869 | { |
| 870 | struct acpi_battery *battery = acpi_driver_data(device); | 870 | struct acpi_battery *battery = acpi_driver_data(device); |
| 871 | #ifdef CONFIG_ACPI_SYSFS_POWER | ||
| 872 | struct device *old; | ||
| 873 | #endif | ||
| 871 | 874 | ||
| 872 | if (!battery) | 875 | if (!battery) |
| 873 | return; | 876 | return; |
| 877 | #ifdef CONFIG_ACPI_SYSFS_POWER | ||
| 878 | old = battery->bat.dev; | ||
| 879 | #endif | ||
| 874 | acpi_battery_update(battery); | 880 | acpi_battery_update(battery); |
| 875 | acpi_bus_generate_proc_event(device, event, | 881 | acpi_bus_generate_proc_event(device, event, |
| 876 | acpi_battery_present(battery)); | 882 | acpi_battery_present(battery)); |
| @@ -879,7 +885,7 @@ static void acpi_battery_notify(struct acpi_device *device, u32 event) | |||
| 879 | acpi_battery_present(battery)); | 885 | acpi_battery_present(battery)); |
| 880 | #ifdef CONFIG_ACPI_SYSFS_POWER | 886 | #ifdef CONFIG_ACPI_SYSFS_POWER |
| 881 | /* acpi_battery_update could remove power_supply object */ | 887 | /* acpi_battery_update could remove power_supply object */ |
| 882 | if (battery->bat.dev) | 888 | if (old && battery->bat.dev) |
| 883 | power_supply_changed(&battery->bat); | 889 | power_supply_changed(&battery->bat); |
| 884 | #endif | 890 | #endif |
| 885 | } | 891 | } |
diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c index 01381be05e96..2bb28b9d91c4 100644 --- a/drivers/acpi/blacklist.c +++ b/drivers/acpi/blacklist.c | |||
| @@ -214,7 +214,7 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { | |||
| 214 | .ident = "Sony VGN-SR290J", | 214 | .ident = "Sony VGN-SR290J", |
| 215 | .matches = { | 215 | .matches = { |
| 216 | DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), | 216 | DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), |
| 217 | DMI_MATCH(DMI_PRODUCT_NAME, "Sony VGN-SR290J"), | 217 | DMI_MATCH(DMI_PRODUCT_NAME, "VGN-SR290J"), |
| 218 | }, | 218 | }, |
| 219 | }, | 219 | }, |
| 220 | { | 220 | { |
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 51284351418f..e9699aaed109 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
| @@ -223,7 +223,7 @@ static bool processor_physically_present(acpi_handle handle) | |||
| 223 | type = (acpi_type == ACPI_TYPE_DEVICE) ? 1 : 0; | 223 | type = (acpi_type == ACPI_TYPE_DEVICE) ? 1 : 0; |
| 224 | cpuid = acpi_get_cpuid(handle, type, acpi_id); | 224 | cpuid = acpi_get_cpuid(handle, type, acpi_id); |
| 225 | 225 | ||
| 226 | if (cpuid == -1) | 226 | if ((cpuid == -1) && (num_possible_cpus() > 1)) |
| 227 | return false; | 227 | return false; |
| 228 | 228 | ||
| 229 | return true; | 229 | return true; |
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index 5d64e3acb000..878ac0c2cc68 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c | |||
| @@ -493,7 +493,7 @@ static void __sysrq_put_key_op(int key, struct sysrq_key_op *op_p) | |||
| 493 | sysrq_key_table[i] = op_p; | 493 | sysrq_key_table[i] = op_p; |
| 494 | } | 494 | } |
| 495 | 495 | ||
| 496 | static void __handle_sysrq(int key, struct tty_struct *tty, int check_mask) | 496 | void __handle_sysrq(int key, struct tty_struct *tty, int check_mask) |
| 497 | { | 497 | { |
| 498 | struct sysrq_key_op *op_p; | 498 | struct sysrq_key_op *op_p; |
| 499 | int orig_log_level; | 499 | int orig_log_level; |
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 637c105f53d2..bd78acf3c365 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c | |||
| @@ -1183,10 +1183,14 @@ static size_t sg_copy_end_to_buffer(struct scatterlist *sgl, unsigned int nents, | |||
| 1183 | /* Copy part of this segment */ | 1183 | /* Copy part of this segment */ |
| 1184 | ignore = skip - offset; | 1184 | ignore = skip - offset; |
| 1185 | len = miter.length - ignore; | 1185 | len = miter.length - ignore; |
| 1186 | if (boffset + len > buflen) | ||
| 1187 | len = buflen - boffset; | ||
| 1186 | memcpy(buf + boffset, miter.addr + ignore, len); | 1188 | memcpy(buf + boffset, miter.addr + ignore, len); |
| 1187 | } else { | 1189 | } else { |
| 1188 | /* Copy all of this segment */ | 1190 | /* Copy all of this segment (up to buflen) */ |
| 1189 | len = miter.length; | 1191 | len = miter.length; |
| 1192 | if (boffset + len > buflen) | ||
| 1193 | len = buflen - boffset; | ||
| 1190 | memcpy(buf + boffset, miter.addr, len); | 1194 | memcpy(buf + boffset, miter.addr, len); |
| 1191 | } | 1195 | } |
| 1192 | boffset += len; | 1196 | boffset += len; |
diff --git a/drivers/gpu/drm/radeon/evergreen_cs.c b/drivers/gpu/drm/radeon/evergreen_cs.c index 010963d4570f..345a75a03c96 100644 --- a/drivers/gpu/drm/radeon/evergreen_cs.c +++ b/drivers/gpu/drm/radeon/evergreen_cs.c | |||
| @@ -333,7 +333,6 @@ static int evergreen_cs_packet_parse_vline(struct radeon_cs_parser *p) | |||
| 333 | header = radeon_get_ib_value(p, h_idx); | 333 | header = radeon_get_ib_value(p, h_idx); |
| 334 | crtc_id = radeon_get_ib_value(p, h_idx + 2 + 7 + 1); | 334 | crtc_id = radeon_get_ib_value(p, h_idx + 2 + 7 + 1); |
| 335 | reg = CP_PACKET0_GET_REG(header); | 335 | reg = CP_PACKET0_GET_REG(header); |
| 336 | mutex_lock(&p->rdev->ddev->mode_config.mutex); | ||
| 337 | obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC); | 336 | obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC); |
| 338 | if (!obj) { | 337 | if (!obj) { |
| 339 | DRM_ERROR("cannot find crtc %d\n", crtc_id); | 338 | DRM_ERROR("cannot find crtc %d\n", crtc_id); |
| @@ -368,7 +367,6 @@ static int evergreen_cs_packet_parse_vline(struct radeon_cs_parser *p) | |||
| 368 | } | 367 | } |
| 369 | } | 368 | } |
| 370 | out: | 369 | out: |
| 371 | mutex_unlock(&p->rdev->ddev->mode_config.mutex); | ||
| 372 | return r; | 370 | return r; |
| 373 | } | 371 | } |
| 374 | 372 | ||
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c index aab5ba040bd6..a89a15ab524d 100644 --- a/drivers/gpu/drm/radeon/r100.c +++ b/drivers/gpu/drm/radeon/r100.c | |||
| @@ -1230,7 +1230,6 @@ int r100_cs_packet_parse_vline(struct radeon_cs_parser *p) | |||
| 1230 | header = radeon_get_ib_value(p, h_idx); | 1230 | header = radeon_get_ib_value(p, h_idx); |
| 1231 | crtc_id = radeon_get_ib_value(p, h_idx + 5); | 1231 | crtc_id = radeon_get_ib_value(p, h_idx + 5); |
| 1232 | reg = CP_PACKET0_GET_REG(header); | 1232 | reg = CP_PACKET0_GET_REG(header); |
| 1233 | mutex_lock(&p->rdev->ddev->mode_config.mutex); | ||
| 1234 | obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC); | 1233 | obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC); |
| 1235 | if (!obj) { | 1234 | if (!obj) { |
| 1236 | DRM_ERROR("cannot find crtc %d\n", crtc_id); | 1235 | DRM_ERROR("cannot find crtc %d\n", crtc_id); |
| @@ -1264,7 +1263,6 @@ int r100_cs_packet_parse_vline(struct radeon_cs_parser *p) | |||
| 1264 | ib[h_idx + 3] |= RADEON_ENG_DISPLAY_SELECT_CRTC1; | 1263 | ib[h_idx + 3] |= RADEON_ENG_DISPLAY_SELECT_CRTC1; |
| 1265 | } | 1264 | } |
| 1266 | out: | 1265 | out: |
| 1267 | mutex_unlock(&p->rdev->ddev->mode_config.mutex); | ||
| 1268 | return r; | 1266 | return r; |
| 1269 | } | 1267 | } |
| 1270 | 1268 | ||
diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c index c39c1bc13016..144c32d37136 100644 --- a/drivers/gpu/drm/radeon/r600_cs.c +++ b/drivers/gpu/drm/radeon/r600_cs.c | |||
| @@ -585,7 +585,7 @@ static int r600_cs_packet_parse_vline(struct radeon_cs_parser *p) | |||
| 585 | header = radeon_get_ib_value(p, h_idx); | 585 | header = radeon_get_ib_value(p, h_idx); |
| 586 | crtc_id = radeon_get_ib_value(p, h_idx + 2 + 7 + 1); | 586 | crtc_id = radeon_get_ib_value(p, h_idx + 2 + 7 + 1); |
| 587 | reg = CP_PACKET0_GET_REG(header); | 587 | reg = CP_PACKET0_GET_REG(header); |
| 588 | mutex_lock(&p->rdev->ddev->mode_config.mutex); | 588 | |
| 589 | obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC); | 589 | obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC); |
| 590 | if (!obj) { | 590 | if (!obj) { |
| 591 | DRM_ERROR("cannot find crtc %d\n", crtc_id); | 591 | DRM_ERROR("cannot find crtc %d\n", crtc_id); |
| @@ -620,7 +620,6 @@ static int r600_cs_packet_parse_vline(struct radeon_cs_parser *p) | |||
| 620 | ib[h_idx + 4] = AVIVO_D2MODE_VLINE_STATUS >> 2; | 620 | ib[h_idx + 4] = AVIVO_D2MODE_VLINE_STATUS >> 2; |
| 621 | } | 621 | } |
| 622 | out: | 622 | out: |
| 623 | mutex_unlock(&p->rdev->ddev->mode_config.mutex); | ||
| 624 | return r; | 623 | return r; |
| 625 | } | 624 | } |
| 626 | 625 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c index d1c1d8dd93ce..2417d7b06fdb 100644 --- a/drivers/gpu/drm/radeon/radeon_combios.c +++ b/drivers/gpu/drm/radeon/radeon_combios.c | |||
| @@ -3050,6 +3050,14 @@ void radeon_combios_asic_init(struct drm_device *dev) | |||
| 3050 | rdev->pdev->subsystem_device == 0x308b) | 3050 | rdev->pdev->subsystem_device == 0x308b) |
| 3051 | return; | 3051 | return; |
| 3052 | 3052 | ||
| 3053 | /* quirk for rs4xx HP dv5000 laptop to make it resume | ||
| 3054 | * - it hangs on resume inside the dynclk 1 table. | ||
| 3055 | */ | ||
| 3056 | if (rdev->family == CHIP_RS480 && | ||
| 3057 | rdev->pdev->subsystem_vendor == 0x103c && | ||
| 3058 | rdev->pdev->subsystem_device == 0x30a4) | ||
| 3059 | return; | ||
| 3060 | |||
| 3053 | /* DYN CLK 1 */ | 3061 | /* DYN CLK 1 */ |
| 3054 | table = combios_get_table_offset(dev, COMBIOS_DYN_CLK_1_TABLE); | 3062 | table = combios_get_table_offset(dev, COMBIOS_DYN_CLK_1_TABLE); |
| 3055 | if (table) | 3063 | if (table) |
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c index 6a70c0dc7f92..ab389f89fa8d 100644 --- a/drivers/gpu/drm/radeon/radeon_kms.c +++ b/drivers/gpu/drm/radeon/radeon_kms.c | |||
| @@ -128,7 +128,8 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) | |||
| 128 | for (i = 0, found = 0; i < rdev->num_crtc; i++) { | 128 | for (i = 0, found = 0; i < rdev->num_crtc; i++) { |
| 129 | crtc = (struct drm_crtc *)minfo->crtcs[i]; | 129 | crtc = (struct drm_crtc *)minfo->crtcs[i]; |
| 130 | if (crtc && crtc->base.id == value) { | 130 | if (crtc && crtc->base.id == value) { |
| 131 | value = i; | 131 | struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); |
| 132 | value = radeon_crtc->crtc_id; | ||
| 132 | found = 1; | 133 | found = 1; |
| 133 | break; | 134 | break; |
| 134 | } | 135 | } |
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c index bad77f40a9da..5688a0cf6bbe 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c | |||
| @@ -108,6 +108,7 @@ static void radeon_legacy_lvds_dpms(struct drm_encoder *encoder, int mode) | |||
| 108 | udelay(panel_pwr_delay * 1000); | 108 | udelay(panel_pwr_delay * 1000); |
| 109 | WREG32(RADEON_LVDS_GEN_CNTL, lvds_gen_cntl); | 109 | WREG32(RADEON_LVDS_GEN_CNTL, lvds_gen_cntl); |
| 110 | WREG32_PLL(RADEON_PIXCLKS_CNTL, pixclks_cntl); | 110 | WREG32_PLL(RADEON_PIXCLKS_CNTL, pixclks_cntl); |
| 111 | udelay(panel_pwr_delay * 1000); | ||
| 111 | break; | 112 | break; |
| 112 | } | 113 | } |
| 113 | 114 | ||
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index 1f32b460adce..ca904799f018 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c | |||
| @@ -40,13 +40,13 @@ | |||
| 40 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
| 41 | 41 | ||
| 42 | #include <asm/atomic.h> | 42 | #include <asm/atomic.h> |
| 43 | #ifdef TTM_HAS_AGP | ||
| 44 | #include <asm/agp.h> | ||
| 45 | #endif | ||
| 46 | 43 | ||
| 47 | #include "ttm/ttm_bo_driver.h" | 44 | #include "ttm/ttm_bo_driver.h" |
| 48 | #include "ttm/ttm_page_alloc.h" | 45 | #include "ttm/ttm_page_alloc.h" |
| 49 | 46 | ||
| 47 | #ifdef TTM_HAS_AGP | ||
| 48 | #include <asm/agp.h> | ||
| 49 | #endif | ||
| 50 | 50 | ||
| 51 | #define NUM_PAGES_TO_ALLOC (PAGE_SIZE/sizeof(struct page *)) | 51 | #define NUM_PAGES_TO_ALLOC (PAGE_SIZE/sizeof(struct page *)) |
| 52 | #define SMALL_ALLOCATION 16 | 52 | #define SMALL_ALLOCATION 16 |
| @@ -394,7 +394,7 @@ static int ttm_pool_get_num_unused_pages(void) | |||
| 394 | /** | 394 | /** |
| 395 | * Callback for mm to request pool to reduce number of page held. | 395 | * Callback for mm to request pool to reduce number of page held. |
| 396 | */ | 396 | */ |
| 397 | static int ttm_pool_mm_shrink(int shrink_pages, gfp_t gfp_mask) | 397 | static int ttm_pool_mm_shrink(struct shrinker *shrink, int shrink_pages, gfp_t gfp_mask) |
| 398 | { | 398 | { |
| 399 | static atomic_t start_pool = ATOMIC_INIT(0); | 399 | static atomic_t start_pool = ATOMIC_INIT(0); |
| 400 | unsigned i; | 400 | unsigned i; |
diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c index fbd62abb66f9..0ffaf2c77a19 100644 --- a/drivers/input/joystick/gamecon.c +++ b/drivers/input/joystick/gamecon.c | |||
| @@ -89,7 +89,6 @@ struct gc_pad { | |||
| 89 | struct gc { | 89 | struct gc { |
| 90 | struct pardevice *pd; | 90 | struct pardevice *pd; |
| 91 | struct gc_pad pads[GC_MAX_DEVICES]; | 91 | struct gc_pad pads[GC_MAX_DEVICES]; |
| 92 | struct input_dev *dev[GC_MAX_DEVICES]; | ||
| 93 | struct timer_list timer; | 92 | struct timer_list timer; |
| 94 | int pad_count[GC_MAX]; | 93 | int pad_count[GC_MAX]; |
| 95 | int used; | 94 | int used; |
| @@ -387,7 +386,7 @@ static void gc_nes_process_packet(struct gc *gc) | |||
| 387 | for (i = 0; i < GC_MAX_DEVICES; i++) { | 386 | for (i = 0; i < GC_MAX_DEVICES; i++) { |
| 388 | 387 | ||
| 389 | pad = &gc->pads[i]; | 388 | pad = &gc->pads[i]; |
| 390 | dev = gc->dev[i]; | 389 | dev = pad->dev; |
| 391 | s = gc_status_bit[i]; | 390 | s = gc_status_bit[i]; |
| 392 | 391 | ||
| 393 | switch (pad->type) { | 392 | switch (pad->type) { |
| @@ -579,7 +578,7 @@ static void gc_psx_command(struct gc *gc, int b, unsigned char *data) | |||
| 579 | read = parport_read_status(port) ^ 0x80; | 578 | read = parport_read_status(port) ^ 0x80; |
| 580 | 579 | ||
| 581 | for (j = 0; j < GC_MAX_DEVICES; j++) { | 580 | for (j = 0; j < GC_MAX_DEVICES; j++) { |
| 582 | struct gc_pad *pad = &gc->pads[i]; | 581 | struct gc_pad *pad = &gc->pads[j]; |
| 583 | 582 | ||
| 584 | if (pad->type == GC_PSX || pad->type == GC_DDR) | 583 | if (pad->type == GC_PSX || pad->type == GC_DDR) |
| 585 | data[j] |= (read & gc_status_bit[j]) ? (1 << i) : 0; | 584 | data[j] |= (read & gc_status_bit[j]) ? (1 << i) : 0; |
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index 3525f533e186..1ba25145b333 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig | |||
| @@ -124,7 +124,7 @@ config KEYBOARD_ATKBD_RDI_KEYCODES | |||
| 124 | right-hand column will be interpreted as the key shown in the | 124 | right-hand column will be interpreted as the key shown in the |
| 125 | left-hand column. | 125 | left-hand column. |
| 126 | 126 | ||
| 127 | config QT2160 | 127 | config KEYBOARD_QT2160 |
| 128 | tristate "Atmel AT42QT2160 Touch Sensor Chip" | 128 | tristate "Atmel AT42QT2160 Touch Sensor Chip" |
| 129 | depends on I2C && EXPERIMENTAL | 129 | depends on I2C && EXPERIMENTAL |
| 130 | help | 130 | help |
diff --git a/drivers/input/keyboard/twl4030_keypad.c b/drivers/input/keyboard/twl4030_keypad.c index 7aa59e07b689..fb16b5e5ea13 100644 --- a/drivers/input/keyboard/twl4030_keypad.c +++ b/drivers/input/keyboard/twl4030_keypad.c | |||
| @@ -51,8 +51,12 @@ | |||
| 51 | */ | 51 | */ |
| 52 | #define TWL4030_MAX_ROWS 8 /* TWL4030 hard limit */ | 52 | #define TWL4030_MAX_ROWS 8 /* TWL4030 hard limit */ |
| 53 | #define TWL4030_MAX_COLS 8 | 53 | #define TWL4030_MAX_COLS 8 |
| 54 | #define TWL4030_ROW_SHIFT 3 | 54 | /* |
| 55 | #define TWL4030_KEYMAP_SIZE (TWL4030_MAX_ROWS * TWL4030_MAX_COLS) | 55 | * Note that we add space for an extra column so that we can handle |
| 56 | * row lines connected to the gnd (see twl4030_col_xlate()). | ||
| 57 | */ | ||
| 58 | #define TWL4030_ROW_SHIFT 4 | ||
| 59 | #define TWL4030_KEYMAP_SIZE (TWL4030_MAX_ROWS << TWL4030_ROW_SHIFT) | ||
| 56 | 60 | ||
| 57 | struct twl4030_keypad { | 61 | struct twl4030_keypad { |
| 58 | unsigned short keymap[TWL4030_KEYMAP_SIZE]; | 62 | unsigned short keymap[TWL4030_KEYMAP_SIZE]; |
| @@ -182,7 +186,7 @@ static int twl4030_read_kp_matrix_state(struct twl4030_keypad *kp, u16 *state) | |||
| 182 | return ret; | 186 | return ret; |
| 183 | } | 187 | } |
| 184 | 188 | ||
| 185 | static int twl4030_is_in_ghost_state(struct twl4030_keypad *kp, u16 *key_state) | 189 | static bool twl4030_is_in_ghost_state(struct twl4030_keypad *kp, u16 *key_state) |
| 186 | { | 190 | { |
| 187 | int i; | 191 | int i; |
| 188 | u16 check = 0; | 192 | u16 check = 0; |
| @@ -191,12 +195,12 @@ static int twl4030_is_in_ghost_state(struct twl4030_keypad *kp, u16 *key_state) | |||
| 191 | u16 col = key_state[i]; | 195 | u16 col = key_state[i]; |
| 192 | 196 | ||
| 193 | if ((col & check) && hweight16(col) > 1) | 197 | if ((col & check) && hweight16(col) > 1) |
| 194 | return 1; | 198 | return true; |
| 195 | 199 | ||
| 196 | check |= col; | 200 | check |= col; |
| 197 | } | 201 | } |
| 198 | 202 | ||
| 199 | return 0; | 203 | return false; |
| 200 | } | 204 | } |
| 201 | 205 | ||
| 202 | static void twl4030_kp_scan(struct twl4030_keypad *kp, bool release_all) | 206 | static void twl4030_kp_scan(struct twl4030_keypad *kp, bool release_all) |
| @@ -225,7 +229,8 @@ static void twl4030_kp_scan(struct twl4030_keypad *kp, bool release_all) | |||
| 225 | if (!changed) | 229 | if (!changed) |
| 226 | continue; | 230 | continue; |
| 227 | 231 | ||
| 228 | for (col = 0; col < kp->n_cols; col++) { | 232 | /* Extra column handles "all gnd" rows */ |
| 233 | for (col = 0; col < kp->n_cols + 1; col++) { | ||
| 229 | int code; | 234 | int code; |
| 230 | 235 | ||
| 231 | if (!(changed & (1 << col))) | 236 | if (!(changed & (1 << col))) |
diff --git a/drivers/input/keyboard/w90p910_keypad.c b/drivers/input/keyboard/w90p910_keypad.c index 4ef764cc493c..ee2bf6bcf291 100644 --- a/drivers/input/keyboard/w90p910_keypad.c +++ b/drivers/input/keyboard/w90p910_keypad.c | |||
| @@ -258,7 +258,7 @@ static struct platform_driver w90p910_keypad_driver = { | |||
| 258 | .probe = w90p910_keypad_probe, | 258 | .probe = w90p910_keypad_probe, |
| 259 | .remove = __devexit_p(w90p910_keypad_remove), | 259 | .remove = __devexit_p(w90p910_keypad_remove), |
| 260 | .driver = { | 260 | .driver = { |
| 261 | .name = "nuc900-keypad", | 261 | .name = "nuc900-kpi", |
| 262 | .owner = THIS_MODULE, | 262 | .owner = THIS_MODULE, |
| 263 | }, | 263 | }, |
| 264 | }; | 264 | }; |
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 9ba9c4a17e15..705589dc9ac5 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c | |||
| @@ -141,8 +141,13 @@ static int synaptics_capability(struct psmouse *psmouse) | |||
| 141 | priv->capabilities = (cap[0] << 16) | (cap[1] << 8) | cap[2]; | 141 | priv->capabilities = (cap[0] << 16) | (cap[1] << 8) | cap[2]; |
| 142 | priv->ext_cap = priv->ext_cap_0c = 0; | 142 | priv->ext_cap = priv->ext_cap_0c = 0; |
| 143 | 143 | ||
| 144 | if (!SYN_CAP_VALID(priv->capabilities)) | 144 | /* |
| 145 | * Older firmwares had submodel ID fixed to 0x47 | ||
| 146 | */ | ||
| 147 | if (SYN_ID_FULL(priv->identity) < 0x705 && | ||
| 148 | SYN_CAP_SUBMODEL_ID(priv->capabilities) != 0x47) { | ||
| 145 | return -1; | 149 | return -1; |
| 150 | } | ||
| 146 | 151 | ||
| 147 | /* | 152 | /* |
| 148 | * Unless capExtended is set the rest of the flags should be ignored | 153 | * Unless capExtended is set the rest of the flags should be ignored |
diff --git a/drivers/input/mouse/synaptics.h b/drivers/input/mouse/synaptics.h index 7d4d5e12c0df..b6aa7d20d8a3 100644 --- a/drivers/input/mouse/synaptics.h +++ b/drivers/input/mouse/synaptics.h | |||
| @@ -47,7 +47,7 @@ | |||
| 47 | #define SYN_CAP_FOUR_BUTTON(c) ((c) & (1 << 3)) | 47 | #define SYN_CAP_FOUR_BUTTON(c) ((c) & (1 << 3)) |
| 48 | #define SYN_CAP_MULTIFINGER(c) ((c) & (1 << 1)) | 48 | #define SYN_CAP_MULTIFINGER(c) ((c) & (1 << 1)) |
| 49 | #define SYN_CAP_PALMDETECT(c) ((c) & (1 << 0)) | 49 | #define SYN_CAP_PALMDETECT(c) ((c) & (1 << 0)) |
| 50 | #define SYN_CAP_VALID(c) ((((c) & 0x00ff00) >> 8) == 0x47) | 50 | #define SYN_CAP_SUBMODEL_ID(c) (((c) & 0x00ff00) >> 8) |
| 51 | #define SYN_EXT_CAP_REQUESTS(c) (((c) & 0x700000) >> 20) | 51 | #define SYN_EXT_CAP_REQUESTS(c) (((c) & 0x700000) >> 20) |
| 52 | #define SYN_CAP_MULTI_BUTTON_NO(ec) (((ec) & 0x00f000) >> 12) | 52 | #define SYN_CAP_MULTI_BUTTON_NO(ec) (((ec) & 0x00f000) >> 12) |
| 53 | #define SYN_CAP_PRODUCT_ID(ec) (((ec) & 0xff0000) >> 16) | 53 | #define SYN_CAP_PRODUCT_ID(ec) (((ec) & 0xff0000) >> 16) |
| @@ -66,6 +66,7 @@ | |||
| 66 | #define SYN_ID_MODEL(i) (((i) >> 4) & 0x0f) | 66 | #define SYN_ID_MODEL(i) (((i) >> 4) & 0x0f) |
| 67 | #define SYN_ID_MAJOR(i) ((i) & 0x0f) | 67 | #define SYN_ID_MAJOR(i) ((i) & 0x0f) |
| 68 | #define SYN_ID_MINOR(i) (((i) >> 16) & 0xff) | 68 | #define SYN_ID_MINOR(i) (((i) >> 16) & 0xff) |
| 69 | #define SYN_ID_FULL(i) ((SYN_ID_MAJOR(i) << 8) | SYN_ID_MINOR(i)) | ||
| 69 | #define SYN_ID_IS_SYNAPTICS(i) ((((i) >> 8) & 0xff) == 0x47) | 70 | #define SYN_ID_IS_SYNAPTICS(i) ((((i) >> 8) & 0xff) == 0x47) |
| 70 | 71 | ||
| 71 | /* synaptics special commands */ | 72 | /* synaptics special commands */ |
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index 81003c4739f4..ed7ad7416b24 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
| @@ -170,6 +170,13 @@ static const struct dmi_system_id __initconst i8042_dmi_noloop_table[] = { | |||
| 170 | }, | 170 | }, |
| 171 | }, | 171 | }, |
| 172 | { | 172 | { |
| 173 | /* Gigabyte Spring Peak - defines wrong chassis type */ | ||
| 174 | .matches = { | ||
| 175 | DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"), | ||
| 176 | DMI_MATCH(DMI_PRODUCT_NAME, "Spring Peak"), | ||
| 177 | }, | ||
| 178 | }, | ||
| 179 | { | ||
| 173 | .matches = { | 180 | .matches = { |
| 174 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | 181 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), |
| 175 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv9700"), | 182 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv9700"), |
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index 29f91fac1dff..a4cd9adfcbc0 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c | |||
| @@ -857,8 +857,10 @@ void pcmcia_disable_device(struct pcmcia_device *p_dev) | |||
| 857 | { | 857 | { |
| 858 | pcmcia_release_configuration(p_dev); | 858 | pcmcia_release_configuration(p_dev); |
| 859 | pcmcia_release_io(p_dev, &p_dev->io); | 859 | pcmcia_release_io(p_dev, &p_dev->io); |
| 860 | if (p_dev->_irq) | 860 | if (p_dev->_irq) { |
| 861 | free_irq(p_dev->irq, p_dev->priv); | 861 | free_irq(p_dev->irq, p_dev->priv); |
| 862 | p_dev->_irq = 0; | ||
| 863 | } | ||
| 862 | if (p_dev->win) | 864 | if (p_dev->win) |
| 863 | pcmcia_release_window(p_dev, p_dev->win); | 865 | pcmcia_release_window(p_dev, p_dev->win); |
| 864 | } | 866 | } |
diff --git a/drivers/sbus/char/openprom.c b/drivers/sbus/char/openprom.c index d53e62ab09da..aacbe14e2e7a 100644 --- a/drivers/sbus/char/openprom.c +++ b/drivers/sbus/char/openprom.c | |||
| @@ -554,7 +554,7 @@ static int opiocgetnext(unsigned int cmd, void __user *argp) | |||
| 554 | static int openprom_bsd_ioctl(struct file * file, | 554 | static int openprom_bsd_ioctl(struct file * file, |
| 555 | unsigned int cmd, unsigned long arg) | 555 | unsigned int cmd, unsigned long arg) |
| 556 | { | 556 | { |
| 557 | DATA *data = (DATA *) file->private_data; | 557 | DATA *data = file->private_data; |
| 558 | void __user *argp = (void __user *)arg; | 558 | void __user *argp = (void __user *)arg; |
| 559 | int err; | 559 | int err; |
| 560 | 560 | ||
| @@ -601,7 +601,7 @@ static int openprom_bsd_ioctl(struct file * file, | |||
| 601 | static long openprom_ioctl(struct file * file, | 601 | static long openprom_ioctl(struct file * file, |
| 602 | unsigned int cmd, unsigned long arg) | 602 | unsigned int cmd, unsigned long arg) |
| 603 | { | 603 | { |
| 604 | DATA *data = (DATA *) file->private_data; | 604 | DATA *data = file->private_data; |
| 605 | 605 | ||
| 606 | switch (cmd) { | 606 | switch (cmd) { |
| 607 | case OPROMGETOPT: | 607 | case OPROMGETOPT: |
diff --git a/drivers/serial/suncore.c b/drivers/serial/suncore.c index ed7d958b0a01..544f2e25d0e5 100644 --- a/drivers/serial/suncore.c +++ b/drivers/serial/suncore.c | |||
| @@ -71,7 +71,9 @@ int sunserial_console_match(struct console *con, struct device_node *dp, | |||
| 71 | 71 | ||
| 72 | con->index = line; | 72 | con->index = line; |
| 73 | drv->cons = con; | 73 | drv->cons = con; |
| 74 | add_preferred_console(con->name, line, NULL); | 74 | |
| 75 | if (!console_set_on_cmdline) | ||
| 76 | add_preferred_console(con->name, line, NULL); | ||
| 75 | 77 | ||
| 76 | return 1; | 78 | return 1; |
| 77 | } | 79 | } |
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index 234459c2f012..ffbf4553f665 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c | |||
| @@ -1500,20 +1500,25 @@ out_unmap: | |||
| 1500 | static int __devexit su_remove(struct of_device *op) | 1500 | static int __devexit su_remove(struct of_device *op) |
| 1501 | { | 1501 | { |
| 1502 | struct uart_sunsu_port *up = dev_get_drvdata(&op->dev); | 1502 | struct uart_sunsu_port *up = dev_get_drvdata(&op->dev); |
| 1503 | bool kbdms = false; | ||
| 1503 | 1504 | ||
| 1504 | if (up->su_type == SU_PORT_MS || | 1505 | if (up->su_type == SU_PORT_MS || |
| 1505 | up->su_type == SU_PORT_KBD) { | 1506 | up->su_type == SU_PORT_KBD) |
| 1507 | kbdms = true; | ||
| 1508 | |||
| 1509 | if (kbdms) { | ||
| 1506 | #ifdef CONFIG_SERIO | 1510 | #ifdef CONFIG_SERIO |
| 1507 | serio_unregister_port(&up->serio); | 1511 | serio_unregister_port(&up->serio); |
| 1508 | #endif | 1512 | #endif |
| 1509 | kfree(up); | 1513 | } else if (up->port.type != PORT_UNKNOWN) |
| 1510 | } else if (up->port.type != PORT_UNKNOWN) { | ||
| 1511 | uart_remove_one_port(&sunsu_reg, &up->port); | 1514 | uart_remove_one_port(&sunsu_reg, &up->port); |
| 1512 | } | ||
| 1513 | 1515 | ||
| 1514 | if (up->port.membase) | 1516 | if (up->port.membase) |
| 1515 | of_iounmap(&op->resource[0], up->port.membase, up->reg_size); | 1517 | of_iounmap(&op->resource[0], up->port.membase, up->reg_size); |
| 1516 | 1518 | ||
| 1519 | if (kbdms) | ||
| 1520 | kfree(up); | ||
| 1521 | |||
| 1517 | dev_set_drvdata(&op->dev, NULL); | 1522 | dev_set_drvdata(&op->dev, NULL); |
| 1518 | 1523 | ||
| 1519 | return 0; | 1524 | return 0; |
diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c index d69eccf5f197..2aaa0f75c6cf 100644 --- a/drivers/usb/gadget/f_fs.c +++ b/drivers/usb/gadget/f_fs.c | |||
| @@ -136,7 +136,7 @@ struct ffs_data { | |||
| 136 | * handling setup requests immidiatelly user space may be so | 136 | * handling setup requests immidiatelly user space may be so |
| 137 | * slow that another setup will be sent to the gadget but this | 137 | * slow that another setup will be sent to the gadget but this |
| 138 | * time not to us but another function and then there could be | 138 | * time not to us but another function and then there could be |
| 139 | * a race. Is taht the case? Or maybe we can use cdev->req | 139 | * a race. Is that the case? Or maybe we can use cdev->req |
| 140 | * after all, maybe we just need some spinlock for that? */ | 140 | * after all, maybe we just need some spinlock for that? */ |
| 141 | struct usb_request *ep0req; /* P: mutex */ | 141 | struct usb_request *ep0req; /* P: mutex */ |
| 142 | struct completion ep0req_completion; /* P: mutex */ | 142 | struct completion ep0req_completion; /* P: mutex */ |
diff --git a/drivers/video/aty/radeon_pm.c b/drivers/video/aty/radeon_pm.c index 515cf1978d19..c4e17642d9c5 100644 --- a/drivers/video/aty/radeon_pm.c +++ b/drivers/video/aty/radeon_pm.c | |||
| @@ -2872,7 +2872,7 @@ void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk, int ignore_devlis | |||
| 2872 | } | 2872 | } |
| 2873 | 2873 | ||
| 2874 | #if 0 | 2874 | #if 0 |
| 2875 | /* Power down TV DAC, taht saves a significant amount of power, | 2875 | /* Power down TV DAC, that saves a significant amount of power, |
| 2876 | * we'll have something better once we actually have some TVOut | 2876 | * we'll have something better once we actually have some TVOut |
| 2877 | * support | 2877 | * support |
| 2878 | */ | 2878 | */ |
