uhci-debug.c (ecd740c6f2f092b90b95fa35f757973589eaaca2) | uhci-debug.c (b25472f9b96159cc0b9b7ed449448805973cd789) |
---|---|
1/* 2 * UHCI-specific debugging code. Invaluable when something 3 * goes wrong, but don't get in my face. 4 * 5 * Kernel visible pointers are surrounded in []s and bus 6 * visible pointers are surrounded in ()s 7 * 8 * (C) Copyright 1999 Linus Torvalds --- 570 unchanged lines hidden (view full) --- 579 580 file->private_data = up; 581 582 return 0; 583} 584 585static loff_t uhci_debug_lseek(struct file *file, loff_t off, int whence) 586{ | 1/* 2 * UHCI-specific debugging code. Invaluable when something 3 * goes wrong, but don't get in my face. 4 * 5 * Kernel visible pointers are surrounded in []s and bus 6 * visible pointers are surrounded in ()s 7 * 8 * (C) Copyright 1999 Linus Torvalds --- 570 unchanged lines hidden (view full) --- 579 580 file->private_data = up; 581 582 return 0; 583} 584 585static loff_t uhci_debug_lseek(struct file *file, loff_t off, int whence) 586{ |
587 struct uhci_debug *up; 588 loff_t new = -1; 589 590 up = file->private_data; 591 592 /* 593 * XXX: atomic 64bit seek access, but that needs to be fixed in the VFS 594 */ 595 switch (whence) { 596 case 0: 597 new = off; 598 break; 599 case 1: 600 new = file->f_pos + off; 601 break; 602 } 603 604 if (new < 0 || new > up->size) 605 return -EINVAL; 606 607 return (file->f_pos = new); | 587 struct uhci_debug *up = file->private_data; 588 return no_seek_end_llseek_size(file, off, whence, up->size); |
608} 609 610static ssize_t uhci_debug_read(struct file *file, char __user *buf, 611 size_t nbytes, loff_t *ppos) 612{ 613 struct uhci_debug *up = file->private_data; 614 return simple_read_from_buffer(buf, nbytes, ppos, up->data, up->size); 615} --- 40 unchanged lines hidden --- | 589} 590 591static ssize_t uhci_debug_read(struct file *file, char __user *buf, 592 size_t nbytes, loff_t *ppos) 593{ 594 struct uhci_debug *up = file->private_data; 595 return simple_read_from_buffer(buf, nbytes, ppos, up->data, up->size); 596} --- 40 unchanged lines hidden --- |