diff options
-rw-r--r-- | drivers/char/sonypi.c | 8 | ||||
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_qp.c | 4 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_cq.c | 19 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_qp.c | 15 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_srq.c | 44 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_verbs.c | 8 | ||||
-rw-r--r-- | drivers/infiniband/ulp/iser/iser_memory.c | 6 | ||||
-rw-r--r-- | drivers/input/keyboard/Kconfig | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/gpio_keys.c | 38 | ||||
-rw-r--r-- | drivers/input/serio/i8042-x86ia64io.h | 8 | ||||
-rw-r--r-- | drivers/misc/sony-laptop.c | 10 | ||||
-rw-r--r-- | drivers/net/mlx4/qp.c | 2 | ||||
-rw-r--r-- | include/linux/input.h | 5 |
13 files changed, 114 insertions, 55 deletions
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index 877e53dcb996..921c6d2bc8fc 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c | |||
@@ -1163,7 +1163,7 @@ static struct acpi_driver sonypi_acpi_driver = { | |||
1163 | }; | 1163 | }; |
1164 | #endif | 1164 | #endif |
1165 | 1165 | ||
1166 | static int __devinit sonypi_create_input_devices(void) | 1166 | static int __devinit sonypi_create_input_devices(struct platform_device *pdev) |
1167 | { | 1167 | { |
1168 | struct input_dev *jog_dev; | 1168 | struct input_dev *jog_dev; |
1169 | struct input_dev *key_dev; | 1169 | struct input_dev *key_dev; |
@@ -1177,6 +1177,7 @@ static int __devinit sonypi_create_input_devices(void) | |||
1177 | jog_dev->name = "Sony Vaio Jogdial"; | 1177 | jog_dev->name = "Sony Vaio Jogdial"; |
1178 | jog_dev->id.bustype = BUS_ISA; | 1178 | jog_dev->id.bustype = BUS_ISA; |
1179 | jog_dev->id.vendor = PCI_VENDOR_ID_SONY; | 1179 | jog_dev->id.vendor = PCI_VENDOR_ID_SONY; |
1180 | jog_dev->dev.parent = &pdev->dev; | ||
1180 | 1181 | ||
1181 | jog_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); | 1182 | jog_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); |
1182 | jog_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_MIDDLE); | 1183 | jog_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_MIDDLE); |
@@ -1191,6 +1192,7 @@ static int __devinit sonypi_create_input_devices(void) | |||
1191 | key_dev->name = "Sony Vaio Keys"; | 1192 | key_dev->name = "Sony Vaio Keys"; |
1192 | key_dev->id.bustype = BUS_ISA; | 1193 | key_dev->id.bustype = BUS_ISA; |
1193 | key_dev->id.vendor = PCI_VENDOR_ID_SONY; | 1194 | key_dev->id.vendor = PCI_VENDOR_ID_SONY; |
1195 | key_dev->dev.parent = &pdev->dev; | ||
1194 | 1196 | ||
1195 | /* Initialize the Input Drivers: special keys */ | 1197 | /* Initialize the Input Drivers: special keys */ |
1196 | key_dev->evbit[0] = BIT_MASK(EV_KEY); | 1198 | key_dev->evbit[0] = BIT_MASK(EV_KEY); |
@@ -1385,7 +1387,7 @@ static int __devinit sonypi_probe(struct platform_device *dev) | |||
1385 | 1387 | ||
1386 | if (useinput) { | 1388 | if (useinput) { |
1387 | 1389 | ||
1388 | error = sonypi_create_input_devices(); | 1390 | error = sonypi_create_input_devices(dev); |
1389 | if (error) { | 1391 | if (error) { |
1390 | printk(KERN_ERR | 1392 | printk(KERN_ERR |
1391 | "sonypi: failed to create input devices\n"); | 1393 | "sonypi: failed to create input devices\n"); |
@@ -1432,7 +1434,7 @@ static int __devexit sonypi_remove(struct platform_device *dev) | |||
1432 | { | 1434 | { |
1433 | sonypi_disable(); | 1435 | sonypi_disable(); |
1434 | 1436 | ||
1435 | synchronize_sched(); /* Allow sonypi interrupt to complete. */ | 1437 | synchronize_irq(sonypi_device.irq); |
1436 | flush_scheduled_work(); | 1438 | flush_scheduled_work(); |
1437 | 1439 | ||
1438 | if (useinput) { | 1440 | if (useinput) { |
diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c index 2e3e6547cb78..dd126681fed0 100644 --- a/drivers/infiniband/hw/ehca/ehca_qp.c +++ b/drivers/infiniband/hw/ehca/ehca_qp.c | |||
@@ -1203,7 +1203,7 @@ static int internal_modify_qp(struct ib_qp *ibqp, | |||
1203 | mqpcb->service_level = attr->ah_attr.sl; | 1203 | mqpcb->service_level = attr->ah_attr.sl; |
1204 | update_mask |= EHCA_BMASK_SET(MQPCB_MASK_SERVICE_LEVEL, 1); | 1204 | update_mask |= EHCA_BMASK_SET(MQPCB_MASK_SERVICE_LEVEL, 1); |
1205 | 1205 | ||
1206 | if (ehca_calc_ipd(shca, my_qp->init_attr.port_num, | 1206 | if (ehca_calc_ipd(shca, mqpcb->prim_phys_port, |
1207 | attr->ah_attr.static_rate, | 1207 | attr->ah_attr.static_rate, |
1208 | &mqpcb->max_static_rate)) { | 1208 | &mqpcb->max_static_rate)) { |
1209 | ret = -EINVAL; | 1209 | ret = -EINVAL; |
@@ -1302,7 +1302,7 @@ static int internal_modify_qp(struct ib_qp *ibqp, | |||
1302 | mqpcb->source_path_bits_al = attr->alt_ah_attr.src_path_bits; | 1302 | mqpcb->source_path_bits_al = attr->alt_ah_attr.src_path_bits; |
1303 | mqpcb->service_level_al = attr->alt_ah_attr.sl; | 1303 | mqpcb->service_level_al = attr->alt_ah_attr.sl; |
1304 | 1304 | ||
1305 | if (ehca_calc_ipd(shca, my_qp->init_attr.port_num, | 1305 | if (ehca_calc_ipd(shca, mqpcb->alt_phys_port, |
1306 | attr->alt_ah_attr.static_rate, | 1306 | attr->alt_ah_attr.static_rate, |
1307 | &mqpcb->max_static_rate_al)) { | 1307 | &mqpcb->max_static_rate_al)) { |
1308 | ret = -EINVAL; | 1308 | ret = -EINVAL; |
diff --git a/drivers/infiniband/hw/ipath/ipath_cq.c b/drivers/infiniband/hw/ipath/ipath_cq.c index 08d8ae148cd0..d1380c7a1703 100644 --- a/drivers/infiniband/hw/ipath/ipath_cq.c +++ b/drivers/infiniband/hw/ipath/ipath_cq.c | |||
@@ -395,12 +395,9 @@ int ipath_resize_cq(struct ib_cq *ibcq, int cqe, struct ib_udata *udata) | |||
395 | goto bail; | 395 | goto bail; |
396 | } | 396 | } |
397 | 397 | ||
398 | /* | 398 | /* Check that we can write the offset to mmap. */ |
399 | * Return the address of the WC as the offset to mmap. | ||
400 | * See ipath_mmap() for details. | ||
401 | */ | ||
402 | if (udata && udata->outlen >= sizeof(__u64)) { | 399 | if (udata && udata->outlen >= sizeof(__u64)) { |
403 | __u64 offset = (__u64) wc; | 400 | __u64 offset = 0; |
404 | 401 | ||
405 | ret = ib_copy_to_udata(udata, &offset, sizeof(offset)); | 402 | ret = ib_copy_to_udata(udata, &offset, sizeof(offset)); |
406 | if (ret) | 403 | if (ret) |
@@ -450,6 +447,18 @@ int ipath_resize_cq(struct ib_cq *ibcq, int cqe, struct ib_udata *udata) | |||
450 | struct ipath_mmap_info *ip = cq->ip; | 447 | struct ipath_mmap_info *ip = cq->ip; |
451 | 448 | ||
452 | ipath_update_mmap_info(dev, ip, sz, wc); | 449 | ipath_update_mmap_info(dev, ip, sz, wc); |
450 | |||
451 | /* | ||
452 | * Return the offset to mmap. | ||
453 | * See ipath_mmap() for details. | ||
454 | */ | ||
455 | if (udata && udata->outlen >= sizeof(__u64)) { | ||
456 | ret = ib_copy_to_udata(udata, &ip->offset, | ||
457 | sizeof(ip->offset)); | ||
458 | if (ret) | ||
459 | goto bail; | ||
460 | } | ||
461 | |||
453 | spin_lock_irq(&dev->pending_lock); | 462 | spin_lock_irq(&dev->pending_lock); |
454 | if (list_empty(&ip->pending_mmaps)) | 463 | if (list_empty(&ip->pending_mmaps)) |
455 | list_add(&ip->pending_mmaps, &dev->pending_mmaps); | 464 | list_add(&ip->pending_mmaps, &dev->pending_mmaps); |
diff --git a/drivers/infiniband/hw/ipath/ipath_qp.c b/drivers/infiniband/hw/ipath/ipath_qp.c index 6a41fdbc8e57..b997ff88401b 100644 --- a/drivers/infiniband/hw/ipath/ipath_qp.c +++ b/drivers/infiniband/hw/ipath/ipath_qp.c | |||
@@ -835,7 +835,8 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd, | |||
835 | init_attr->qp_type); | 835 | init_attr->qp_type); |
836 | if (err) { | 836 | if (err) { |
837 | ret = ERR_PTR(err); | 837 | ret = ERR_PTR(err); |
838 | goto bail_rwq; | 838 | vfree(qp->r_rq.wq); |
839 | goto bail_qp; | ||
839 | } | 840 | } |
840 | qp->ip = NULL; | 841 | qp->ip = NULL; |
841 | ipath_reset_qp(qp); | 842 | ipath_reset_qp(qp); |
@@ -863,7 +864,7 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd, | |||
863 | sizeof(offset)); | 864 | sizeof(offset)); |
864 | if (err) { | 865 | if (err) { |
865 | ret = ERR_PTR(err); | 866 | ret = ERR_PTR(err); |
866 | goto bail_rwq; | 867 | goto bail_ip; |
867 | } | 868 | } |
868 | } else { | 869 | } else { |
869 | u32 s = sizeof(struct ipath_rwq) + | 870 | u32 s = sizeof(struct ipath_rwq) + |
@@ -875,7 +876,7 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd, | |||
875 | qp->r_rq.wq); | 876 | qp->r_rq.wq); |
876 | if (!qp->ip) { | 877 | if (!qp->ip) { |
877 | ret = ERR_PTR(-ENOMEM); | 878 | ret = ERR_PTR(-ENOMEM); |
878 | goto bail_rwq; | 879 | goto bail_ip; |
879 | } | 880 | } |
880 | 881 | ||
881 | err = ib_copy_to_udata(udata, &(qp->ip->offset), | 882 | err = ib_copy_to_udata(udata, &(qp->ip->offset), |
@@ -907,9 +908,11 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd, | |||
907 | goto bail; | 908 | goto bail; |
908 | 909 | ||
909 | bail_ip: | 910 | bail_ip: |
910 | kfree(qp->ip); | 911 | if (qp->ip) |
911 | bail_rwq: | 912 | kref_put(&qp->ip->ref, ipath_release_mmap_info); |
912 | vfree(qp->r_rq.wq); | 913 | else |
914 | vfree(qp->r_rq.wq); | ||
915 | ipath_free_qp(&dev->qp_table, qp); | ||
913 | bail_qp: | 916 | bail_qp: |
914 | kfree(qp); | 917 | kfree(qp); |
915 | bail_swq: | 918 | bail_swq: |
diff --git a/drivers/infiniband/hw/ipath/ipath_srq.c b/drivers/infiniband/hw/ipath/ipath_srq.c index 40c36ec19016..2fef36f4b675 100644 --- a/drivers/infiniband/hw/ipath/ipath_srq.c +++ b/drivers/infiniband/hw/ipath/ipath_srq.c | |||
@@ -59,7 +59,7 @@ int ipath_post_srq_receive(struct ib_srq *ibsrq, struct ib_recv_wr *wr, | |||
59 | 59 | ||
60 | if ((unsigned) wr->num_sge > srq->rq.max_sge) { | 60 | if ((unsigned) wr->num_sge > srq->rq.max_sge) { |
61 | *bad_wr = wr; | 61 | *bad_wr = wr; |
62 | ret = -ENOMEM; | 62 | ret = -EINVAL; |
63 | goto bail; | 63 | goto bail; |
64 | } | 64 | } |
65 | 65 | ||
@@ -211,11 +211,11 @@ int ipath_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr, | |||
211 | struct ib_udata *udata) | 211 | struct ib_udata *udata) |
212 | { | 212 | { |
213 | struct ipath_srq *srq = to_isrq(ibsrq); | 213 | struct ipath_srq *srq = to_isrq(ibsrq); |
214 | struct ipath_rwq *wq; | ||
214 | int ret = 0; | 215 | int ret = 0; |
215 | 216 | ||
216 | if (attr_mask & IB_SRQ_MAX_WR) { | 217 | if (attr_mask & IB_SRQ_MAX_WR) { |
217 | struct ipath_rwq *owq; | 218 | struct ipath_rwq *owq; |
218 | struct ipath_rwq *wq; | ||
219 | struct ipath_rwqe *p; | 219 | struct ipath_rwqe *p; |
220 | u32 sz, size, n, head, tail; | 220 | u32 sz, size, n, head, tail; |
221 | 221 | ||
@@ -236,27 +236,20 @@ int ipath_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr, | |||
236 | goto bail; | 236 | goto bail; |
237 | } | 237 | } |
238 | 238 | ||
239 | /* | 239 | /* Check that we can write the offset to mmap. */ |
240 | * Return the address of the RWQ as the offset to mmap. | ||
241 | * See ipath_mmap() for details. | ||
242 | */ | ||
243 | if (udata && udata->inlen >= sizeof(__u64)) { | 240 | if (udata && udata->inlen >= sizeof(__u64)) { |
244 | __u64 offset_addr; | 241 | __u64 offset_addr; |
245 | __u64 offset = (__u64) wq; | 242 | __u64 offset = 0; |
246 | 243 | ||
247 | ret = ib_copy_from_udata(&offset_addr, udata, | 244 | ret = ib_copy_from_udata(&offset_addr, udata, |
248 | sizeof(offset_addr)); | 245 | sizeof(offset_addr)); |
249 | if (ret) { | 246 | if (ret) |
250 | vfree(wq); | 247 | goto bail_free; |
251 | goto bail; | ||
252 | } | ||
253 | udata->outbuf = (void __user *) offset_addr; | 248 | udata->outbuf = (void __user *) offset_addr; |
254 | ret = ib_copy_to_udata(udata, &offset, | 249 | ret = ib_copy_to_udata(udata, &offset, |
255 | sizeof(offset)); | 250 | sizeof(offset)); |
256 | if (ret) { | 251 | if (ret) |
257 | vfree(wq); | 252 | goto bail_free; |
258 | goto bail; | ||
259 | } | ||
260 | } | 253 | } |
261 | 254 | ||
262 | spin_lock_irq(&srq->rq.lock); | 255 | spin_lock_irq(&srq->rq.lock); |
@@ -277,10 +270,8 @@ int ipath_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr, | |||
277 | else | 270 | else |
278 | n -= tail; | 271 | n -= tail; |
279 | if (size <= n) { | 272 | if (size <= n) { |
280 | spin_unlock_irq(&srq->rq.lock); | ||
281 | vfree(wq); | ||
282 | ret = -EINVAL; | 273 | ret = -EINVAL; |
283 | goto bail; | 274 | goto bail_unlock; |
284 | } | 275 | } |
285 | n = 0; | 276 | n = 0; |
286 | p = wq->wq; | 277 | p = wq->wq; |
@@ -314,6 +305,18 @@ int ipath_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr, | |||
314 | u32 s = sizeof(struct ipath_rwq) + size * sz; | 305 | u32 s = sizeof(struct ipath_rwq) + size * sz; |
315 | 306 | ||
316 | ipath_update_mmap_info(dev, ip, s, wq); | 307 | ipath_update_mmap_info(dev, ip, s, wq); |
308 | |||
309 | /* | ||
310 | * Return the offset to mmap. | ||
311 | * See ipath_mmap() for details. | ||
312 | */ | ||
313 | if (udata && udata->inlen >= sizeof(__u64)) { | ||
314 | ret = ib_copy_to_udata(udata, &ip->offset, | ||
315 | sizeof(ip->offset)); | ||
316 | if (ret) | ||
317 | goto bail; | ||
318 | } | ||
319 | |||
317 | spin_lock_irq(&dev->pending_lock); | 320 | spin_lock_irq(&dev->pending_lock); |
318 | if (list_empty(&ip->pending_mmaps)) | 321 | if (list_empty(&ip->pending_mmaps)) |
319 | list_add(&ip->pending_mmaps, | 322 | list_add(&ip->pending_mmaps, |
@@ -328,7 +331,12 @@ int ipath_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr, | |||
328 | srq->limit = attr->srq_limit; | 331 | srq->limit = attr->srq_limit; |
329 | spin_unlock_irq(&srq->rq.lock); | 332 | spin_unlock_irq(&srq->rq.lock); |
330 | } | 333 | } |
334 | goto bail; | ||
331 | 335 | ||
336 | bail_unlock: | ||
337 | spin_unlock_irq(&srq->rq.lock); | ||
338 | bail_free: | ||
339 | vfree(wq); | ||
332 | bail: | 340 | bail: |
333 | return ret; | 341 | return ret; |
334 | } | 342 | } |
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c index 74f77e7c2c1b..c4c998446c7b 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs.c | |||
@@ -302,8 +302,10 @@ static int ipath_post_one_send(struct ipath_qp *qp, struct ib_send_wr *wr) | |||
302 | next = qp->s_head + 1; | 302 | next = qp->s_head + 1; |
303 | if (next >= qp->s_size) | 303 | if (next >= qp->s_size) |
304 | next = 0; | 304 | next = 0; |
305 | if (next == qp->s_last) | 305 | if (next == qp->s_last) { |
306 | goto bail_inval; | 306 | ret = -ENOMEM; |
307 | goto bail; | ||
308 | } | ||
307 | 309 | ||
308 | wqe = get_swqe_ptr(qp, qp->s_head); | 310 | wqe = get_swqe_ptr(qp, qp->s_head); |
309 | wqe->wr = *wr; | 311 | wqe->wr = *wr; |
@@ -404,7 +406,7 @@ static int ipath_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr, | |||
404 | 406 | ||
405 | if ((unsigned) wr->num_sge > qp->r_rq.max_sge) { | 407 | if ((unsigned) wr->num_sge > qp->r_rq.max_sge) { |
406 | *bad_wr = wr; | 408 | *bad_wr = wr; |
407 | ret = -ENOMEM; | 409 | ret = -EINVAL; |
408 | goto bail; | 410 | goto bail; |
409 | } | 411 | } |
410 | 412 | ||
diff --git a/drivers/infiniband/ulp/iser/iser_memory.c b/drivers/infiniband/ulp/iser/iser_memory.c index d68798061795..4a17743a639f 100644 --- a/drivers/infiniband/ulp/iser/iser_memory.c +++ b/drivers/infiniband/ulp/iser/iser_memory.c | |||
@@ -310,13 +310,15 @@ static unsigned int iser_data_buf_aligned_len(struct iser_data_buf *data, | |||
310 | if (i + 1 < data->dma_nents) { | 310 | if (i + 1 < data->dma_nents) { |
311 | next_addr = ib_sg_dma_address(ibdev, sg_next(sg)); | 311 | next_addr = ib_sg_dma_address(ibdev, sg_next(sg)); |
312 | /* are i, i+1 fragments of the same page? */ | 312 | /* are i, i+1 fragments of the same page? */ |
313 | if (end_addr == next_addr) | 313 | if (end_addr == next_addr) { |
314 | cnt++; | ||
314 | continue; | 315 | continue; |
315 | else if (!IS_4K_ALIGNED(end_addr)) { | 316 | } else if (!IS_4K_ALIGNED(end_addr)) { |
316 | ret_len = cnt + 1; | 317 | ret_len = cnt + 1; |
317 | break; | 318 | break; |
318 | } | 319 | } |
319 | } | 320 | } |
321 | cnt++; | ||
320 | } | 322 | } |
321 | if (i == data->dma_nents) | 323 | if (i == data->dma_nents) |
322 | ret_len = cnt; /* loop ended */ | 324 | ret_len = cnt; /* loop ended */ |
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index 2316a018fae6..dfa6592c10f6 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig | |||
@@ -286,7 +286,7 @@ config KEYBOARD_MAPLE | |||
286 | 286 | ||
287 | config KEYBOARD_BFIN | 287 | config KEYBOARD_BFIN |
288 | tristate "Blackfin BF54x keypad support" | 288 | tristate "Blackfin BF54x keypad support" |
289 | depends on BF54x | 289 | depends on (BF54x && !BF544) |
290 | help | 290 | help |
291 | Say Y here if you want to use the BF54x keypad. | 291 | Say Y here if you want to use the BF54x keypad. |
292 | 292 | ||
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 3eddf52a0bba..6a9ca4bdcb74 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c | |||
@@ -75,16 +75,32 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev) | |||
75 | 75 | ||
76 | for (i = 0; i < pdata->nbuttons; i++) { | 76 | for (i = 0; i < pdata->nbuttons; i++) { |
77 | struct gpio_keys_button *button = &pdata->buttons[i]; | 77 | struct gpio_keys_button *button = &pdata->buttons[i]; |
78 | int irq = gpio_to_irq(button->gpio); | 78 | int irq; |
79 | unsigned int type = button->type ?: EV_KEY; | 79 | unsigned int type = button->type ?: EV_KEY; |
80 | 80 | ||
81 | error = gpio_request(button->gpio, button->desc ?: "gpio_keys"); | ||
82 | if (error < 0) { | ||
83 | pr_err("gpio-keys: failed to request GPIO %d," | ||
84 | " error %d\n", button->gpio, error); | ||
85 | goto fail; | ||
86 | } | ||
87 | |||
88 | error = gpio_direction_input(button->gpio); | ||
89 | if (error < 0) { | ||
90 | pr_err("gpio-keys: failed to configure input" | ||
91 | " direction for GPIO %d, error %d\n", | ||
92 | button->gpio, error); | ||
93 | gpio_free(button->gpio); | ||
94 | goto fail; | ||
95 | } | ||
96 | |||
97 | irq = gpio_to_irq(button->gpio); | ||
81 | if (irq < 0) { | 98 | if (irq < 0) { |
82 | error = irq; | 99 | error = irq; |
83 | printk(KERN_ERR | 100 | pr_err("gpio-keys: Unable to get irq number" |
84 | "gpio-keys: " | 101 | " for GPIO %d, error %d\n", |
85 | "Unable to get irq number for GPIO %d," | ||
86 | "error %d\n", | ||
87 | button->gpio, error); | 102 | button->gpio, error); |
103 | gpio_free(button->gpio); | ||
88 | goto fail; | 104 | goto fail; |
89 | } | 105 | } |
90 | 106 | ||
@@ -94,9 +110,9 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev) | |||
94 | button->desc ? button->desc : "gpio_keys", | 110 | button->desc ? button->desc : "gpio_keys", |
95 | pdev); | 111 | pdev); |
96 | if (error) { | 112 | if (error) { |
97 | printk(KERN_ERR | 113 | pr_err("gpio-keys: Unable to claim irq %d; error %d\n", |
98 | "gpio-keys: Unable to claim irq %d; error %d\n", | ||
99 | irq, error); | 114 | irq, error); |
115 | gpio_free(button->gpio); | ||
100 | goto fail; | 116 | goto fail; |
101 | } | 117 | } |
102 | 118 | ||
@@ -108,8 +124,7 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev) | |||
108 | 124 | ||
109 | error = input_register_device(input); | 125 | error = input_register_device(input); |
110 | if (error) { | 126 | if (error) { |
111 | printk(KERN_ERR | 127 | pr_err("gpio-keys: Unable to register input device, " |
112 | "gpio-keys: Unable to register input device, " | ||
113 | "error: %d\n", error); | 128 | "error: %d\n", error); |
114 | goto fail; | 129 | goto fail; |
115 | } | 130 | } |
@@ -119,8 +134,10 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev) | |||
119 | return 0; | 134 | return 0; |
120 | 135 | ||
121 | fail: | 136 | fail: |
122 | while (--i >= 0) | 137 | while (--i >= 0) { |
123 | free_irq(gpio_to_irq(pdata->buttons[i].gpio), pdev); | 138 | free_irq(gpio_to_irq(pdata->buttons[i].gpio), pdev); |
139 | gpio_free(pdata->buttons[i].gpio); | ||
140 | } | ||
124 | 141 | ||
125 | platform_set_drvdata(pdev, NULL); | 142 | platform_set_drvdata(pdev, NULL); |
126 | input_free_device(input); | 143 | input_free_device(input); |
@@ -139,6 +156,7 @@ static int __devexit gpio_keys_remove(struct platform_device *pdev) | |||
139 | for (i = 0; i < pdata->nbuttons; i++) { | 156 | for (i = 0; i < pdata->nbuttons; i++) { |
140 | int irq = gpio_to_irq(pdata->buttons[i].gpio); | 157 | int irq = gpio_to_irq(pdata->buttons[i].gpio); |
141 | free_irq(irq, pdev); | 158 | free_irq(irq, pdev); |
159 | gpio_free(pdata->buttons[i].gpio); | ||
142 | } | 160 | } |
143 | 161 | ||
144 | input_unregister_device(input); | 162 | input_unregister_device(input); |
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index f8fe42148093..c5e68dcd88ac 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
@@ -110,6 +110,14 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = { | |||
110 | DMI_MATCH(DMI_PRODUCT_VERSION, "5a"), | 110 | DMI_MATCH(DMI_PRODUCT_VERSION, "5a"), |
111 | }, | 111 | }, |
112 | }, | 112 | }, |
113 | { | ||
114 | .ident = "Microsoft Virtual Machine", | ||
115 | .matches = { | ||
116 | DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"), | ||
117 | DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"), | ||
118 | DMI_MATCH(DMI_PRODUCT_VERSION, "VS2005R2"), | ||
119 | }, | ||
120 | }, | ||
113 | { } | 121 | { } |
114 | }; | 122 | }; |
115 | 123 | ||
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c index bb13858f60a1..b0f68031b49d 100644 --- a/drivers/misc/sony-laptop.c +++ b/drivers/misc/sony-laptop.c | |||
@@ -338,7 +338,7 @@ static void sony_laptop_report_input_event(u8 event) | |||
338 | dprintk("unknown input event %.2x\n", event); | 338 | dprintk("unknown input event %.2x\n", event); |
339 | } | 339 | } |
340 | 340 | ||
341 | static int sony_laptop_setup_input(void) | 341 | static int sony_laptop_setup_input(struct acpi_device *acpi_device) |
342 | { | 342 | { |
343 | struct input_dev *jog_dev; | 343 | struct input_dev *jog_dev; |
344 | struct input_dev *key_dev; | 344 | struct input_dev *key_dev; |
@@ -379,6 +379,7 @@ static int sony_laptop_setup_input(void) | |||
379 | key_dev->name = "Sony Vaio Keys"; | 379 | key_dev->name = "Sony Vaio Keys"; |
380 | key_dev->id.bustype = BUS_ISA; | 380 | key_dev->id.bustype = BUS_ISA; |
381 | key_dev->id.vendor = PCI_VENDOR_ID_SONY; | 381 | key_dev->id.vendor = PCI_VENDOR_ID_SONY; |
382 | key_dev->dev.parent = &acpi_device->dev; | ||
382 | 383 | ||
383 | /* Initialize the Input Drivers: special keys */ | 384 | /* Initialize the Input Drivers: special keys */ |
384 | set_bit(EV_KEY, key_dev->evbit); | 385 | set_bit(EV_KEY, key_dev->evbit); |
@@ -410,6 +411,7 @@ static int sony_laptop_setup_input(void) | |||
410 | jog_dev->name = "Sony Vaio Jogdial"; | 411 | jog_dev->name = "Sony Vaio Jogdial"; |
411 | jog_dev->id.bustype = BUS_ISA; | 412 | jog_dev->id.bustype = BUS_ISA; |
412 | jog_dev->id.vendor = PCI_VENDOR_ID_SONY; | 413 | jog_dev->id.vendor = PCI_VENDOR_ID_SONY; |
414 | key_dev->dev.parent = &acpi_device->dev; | ||
413 | 415 | ||
414 | jog_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); | 416 | jog_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); |
415 | jog_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_MIDDLE); | 417 | jog_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_MIDDLE); |
@@ -1006,7 +1008,7 @@ static int sony_nc_add(struct acpi_device *device) | |||
1006 | } | 1008 | } |
1007 | 1009 | ||
1008 | /* setup input devices and helper fifo */ | 1010 | /* setup input devices and helper fifo */ |
1009 | result = sony_laptop_setup_input(); | 1011 | result = sony_laptop_setup_input(device); |
1010 | if (result) { | 1012 | if (result) { |
1011 | printk(KERN_ERR DRV_PFX | 1013 | printk(KERN_ERR DRV_PFX |
1012 | "Unabe to create input devices.\n"); | 1014 | "Unabe to create input devices.\n"); |
@@ -1034,7 +1036,7 @@ static int sony_nc_add(struct acpi_device *device) | |||
1034 | sony_backlight_device->props.brightness = | 1036 | sony_backlight_device->props.brightness = |
1035 | sony_backlight_get_brightness | 1037 | sony_backlight_get_brightness |
1036 | (sony_backlight_device); | 1038 | (sony_backlight_device); |
1037 | sony_backlight_device->props.max_brightness = | 1039 | sony_backlight_device->props.max_brightness = |
1038 | SONY_MAX_BRIGHTNESS - 1; | 1040 | SONY_MAX_BRIGHTNESS - 1; |
1039 | } | 1041 | } |
1040 | 1042 | ||
@@ -2453,7 +2455,7 @@ static int sony_pic_add(struct acpi_device *device) | |||
2453 | } | 2455 | } |
2454 | 2456 | ||
2455 | /* setup input devices and helper fifo */ | 2457 | /* setup input devices and helper fifo */ |
2456 | result = sony_laptop_setup_input(); | 2458 | result = sony_laptop_setup_input(device); |
2457 | if (result) { | 2459 | if (result) { |
2458 | printk(KERN_ERR DRV_PFX | 2460 | printk(KERN_ERR DRV_PFX |
2459 | "Unabe to create input devices.\n"); | 2461 | "Unabe to create input devices.\n"); |
diff --git a/drivers/net/mlx4/qp.c b/drivers/net/mlx4/qp.c index 42b47639c81c..fa24e6597591 100644 --- a/drivers/net/mlx4/qp.c +++ b/drivers/net/mlx4/qp.c | |||
@@ -113,7 +113,7 @@ int mlx4_qp_modify(struct mlx4_dev *dev, struct mlx4_mtt *mtt, | |||
113 | struct mlx4_cmd_mailbox *mailbox; | 113 | struct mlx4_cmd_mailbox *mailbox; |
114 | int ret = 0; | 114 | int ret = 0; |
115 | 115 | ||
116 | if (cur_state >= MLX4_QP_NUM_STATE || cur_state >= MLX4_QP_NUM_STATE || | 116 | if (cur_state >= MLX4_QP_NUM_STATE || new_state >= MLX4_QP_NUM_STATE || |
117 | !op[cur_state][new_state]) | 117 | !op[cur_state][new_state]) |
118 | return -EINVAL; | 118 | return -EINVAL; |
119 | 119 | ||
diff --git a/include/linux/input.h b/include/linux/input.h index b45f240a8c45..2075d6da2a31 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -530,6 +530,11 @@ struct input_absinfo { | |||
530 | #define KEY_DOLLAR 0x1b2 | 530 | #define KEY_DOLLAR 0x1b2 |
531 | #define KEY_EURO 0x1b3 | 531 | #define KEY_EURO 0x1b3 |
532 | 532 | ||
533 | #define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */ | ||
534 | #define KEY_FRAMEFORWARD 0x1b5 | ||
535 | |||
536 | #define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ | ||
537 | |||
533 | #define KEY_DEL_EOL 0x1c0 | 538 | #define KEY_DEL_EOL 0x1c0 |
534 | #define KEY_DEL_EOS 0x1c1 | 539 | #define KEY_DEL_EOS 0x1c1 |
535 | #define KEY_INS_LINE 0x1c2 | 540 | #define KEY_INS_LINE 0x1c2 |