Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] hp drivers/input stuff: C99 initializers, NULL noise removal, __user annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Al Viro and committed by
Linus Torvalds
6ce6b3ae 733f99ac

+15 -15
+4 -4
drivers/input/misc/hp_sdc_rtc.c
··· 60 60 61 61 static DECLARE_WAIT_QUEUE_HEAD(hp_sdc_rtc_wait); 62 62 63 - static ssize_t hp_sdc_rtc_read(struct file *file, char *buf, 63 + static ssize_t hp_sdc_rtc_read(struct file *file, char __user *buf, 64 64 size_t count, loff_t *ppos); 65 65 66 66 static int hp_sdc_rtc_ioctl(struct inode *inode, struct file *file, ··· 385 385 return 0; 386 386 } 387 387 388 - static ssize_t hp_sdc_rtc_read(struct file *file, char *buf, 388 + static ssize_t hp_sdc_rtc_read(struct file *file, char __user *buf, 389 389 size_t count, loff_t *ppos) { 390 390 ssize_t retval; 391 391 392 392 if (count < sizeof(unsigned long)) 393 393 return -EINVAL; 394 394 395 - retval = put_user(68, (unsigned long *)buf); 395 + retval = put_user(68, (unsigned long __user *)buf); 396 396 return retval; 397 397 } 398 398 ··· 696 696 if ((ret = hp_sdc_request_timer_irq(&hp_sdc_rtc_isr))) 697 697 return ret; 698 698 misc_register(&hp_sdc_rtc_dev); 699 - create_proc_read_entry ("driver/rtc", 0, 0, 699 + create_proc_read_entry ("driver/rtc", 0, NULL, 700 700 hp_sdc_rtc_read_proc, NULL); 701 701 702 702 printk(KERN_INFO "HP i8042 SDC + MSM-58321 RTC support loaded "
+9 -9
drivers/input/serio/hil_mlc.c
··· 391 391 } 392 392 393 393 #define FUNC(funct, funct_arg, zero_rc, neg_rc, pos_rc) \ 394 - { HILSE_FUNC, { func: &funct }, funct_arg, zero_rc, neg_rc, pos_rc }, 394 + { HILSE_FUNC, { .func = funct }, funct_arg, zero_rc, neg_rc, pos_rc }, 395 395 #define OUT(pack) \ 396 - { HILSE_OUT, { packet: pack }, 0, HILSEN_NEXT, HILSEN_DOZE, 0 }, 396 + { HILSE_OUT, { .packet = pack }, 0, HILSEN_NEXT, HILSEN_DOZE, 0 }, 397 397 #define CTS \ 398 - { HILSE_CTS, { packet: 0 }, 0, HILSEN_NEXT | HILSEN_SCHED | HILSEN_BREAK, HILSEN_DOZE, 0 }, 398 + { HILSE_CTS, { .packet = 0 }, 0, HILSEN_NEXT | HILSEN_SCHED | HILSEN_BREAK, HILSEN_DOZE, 0 }, 399 399 #define EXPECT(comp, to, got, got_wrong, timed_out) \ 400 - { HILSE_EXPECT, { packet: comp }, to, got, got_wrong, timed_out }, 400 + { HILSE_EXPECT, { .packet = comp }, to, got, got_wrong, timed_out }, 401 401 #define EXPECT_LAST(comp, to, got, got_wrong, timed_out) \ 402 - { HILSE_EXPECT_LAST, { packet: comp }, to, got, got_wrong, timed_out }, 402 + { HILSE_EXPECT_LAST, { .packet = comp }, to, got, got_wrong, timed_out }, 403 403 #define EXPECT_DISC(comp, to, got, got_wrong, timed_out) \ 404 - { HILSE_EXPECT_DISC, { packet: comp }, to, got, got_wrong, timed_out }, 404 + { HILSE_EXPECT_DISC, { .packet = comp }, to, got, got_wrong, timed_out }, 405 405 #define IN(to, got, got_error, timed_out) \ 406 - { HILSE_IN, { packet: 0 }, to, got, got_error, timed_out }, 406 + { HILSE_IN, { .packet = 0 }, to, got, got_error, timed_out }, 407 407 #define OUT_DISC(pack) \ 408 - { HILSE_OUT_DISC, { packet: pack }, 0, 0, 0, 0 }, 408 + { HILSE_OUT_DISC, { .packet = pack }, 0, 0, 0, 0 }, 409 409 #define OUT_LAST(pack) \ 410 - { HILSE_OUT_LAST, { packet: pack }, 0, 0, 0, 0 }, 410 + { HILSE_OUT_LAST, { .packet = pack }, 0, 0, 0, 0 }, 411 411 412 412 struct hilse_node hil_mlc_se[HILSEN_END] = { 413 413
+2 -2
drivers/input/serio/hp_sdc.c
··· 310 310 * in tasklet/bh context. 311 311 */ 312 312 if (curr->act.irqhook) 313 - curr->act.irqhook(0, 0, 0, 0); 313 + curr->act.irqhook(0, NULL, 0, 0); 314 314 } 315 315 curr->actidx = curr->idx; 316 316 curr->idx++; ··· 525 525 up(curr->act.semaphore); 526 526 } 527 527 else if (act & HP_SDC_ACT_CALLBACK) { 528 - curr->act.irqhook(0,0,0,0); 528 + curr->act.irqhook(0,NULL,0,0); 529 529 } 530 530 if (curr->idx >= curr->endidx) { /* This transaction is over. */ 531 531 if (act & HP_SDC_ACT_DEALLOC) kfree(curr);