legousbtower.c (e98bdb3059cbf2b1cd4261e126b08429f64466c3) | legousbtower.c (5b5e0928f742cfa853b2411400a1b19fa379d758) |
---|---|
1/* 2 * LEGO USB Tower driver 3 * 4 * Copyright (C) 2003 David Glance <davidgsf@sourceforge.net> 5 * 2001-2004 Juergen Stuber <starblue@users.sourceforge.net> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License as --- 659 unchanged lines hidden (view full) --- 668 retval = wait_event_interruptible (dev->write_wait, !dev->interrupt_out_busy); 669 if (retval) { 670 goto unlock_exit; 671 } 672 } 673 674 /* write the data into interrupt_out_buffer from userspace */ 675 bytes_to_write = min_t(int, count, write_buffer_size); | 1/* 2 * LEGO USB Tower driver 3 * 4 * Copyright (C) 2003 David Glance <davidgsf@sourceforge.net> 5 * 2001-2004 Juergen Stuber <starblue@users.sourceforge.net> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License as --- 659 unchanged lines hidden (view full) --- 668 retval = wait_event_interruptible (dev->write_wait, !dev->interrupt_out_busy); 669 if (retval) { 670 goto unlock_exit; 671 } 672 } 673 674 /* write the data into interrupt_out_buffer from userspace */ 675 bytes_to_write = min_t(int, count, write_buffer_size); |
676 dev_dbg(&dev->udev->dev, "%s: count = %Zd, bytes_to_write = %Zd\n", | 676 dev_dbg(&dev->udev->dev, "%s: count = %zd, bytes_to_write = %zd\n", |
677 __func__, count, bytes_to_write); 678 679 if (copy_from_user (dev->interrupt_out_buffer, buffer, bytes_to_write)) { 680 retval = -EFAULT; 681 goto unlock_exit; 682 } 683 684 /* send off the urb */ --- 296 unchanged lines hidden --- | 677 __func__, count, bytes_to_write); 678 679 if (copy_from_user (dev->interrupt_out_buffer, buffer, bytes_to_write)) { 680 retval = -EFAULT; 681 goto unlock_exit; 682 } 683 684 /* send off the urb */ --- 296 unchanged lines hidden --- |