ChangeSet 1.1305.7.2, 2003/06/13 16:40:57-07:00, [EMAIL PROTECTED]

[PATCH] USB: missed one usblp status buffer change

My previous patch (several months ago) missed one instance of
changing usblp status data from local stack to alloc-ed memory.


 drivers/usb/class/usblp.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


diff -Nru a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
--- a/drivers/usb/class/usblp.c Wed Jun 18 11:16:09 2003
+++ b/drivers/usb/class/usblp.c Wed Jun 18 11:16:09 2003
@@ -426,7 +426,7 @@
 {
        struct usblp *usblp = file->private_data;
        int length, err, i;
-       unsigned char lpstatus, newChannel;
+       unsigned char newChannel;
        int status;
        int twoints[2];
        int retval = 0;
@@ -578,12 +578,12 @@
                switch (cmd) {
 
                        case LPGETSTATUS:
-                               if (usblp_read_status(usblp, &lpstatus)) {
+                               if (usblp_read_status(usblp, usblp->statusbuf)) {
                                        err("usblp%d: failed reading printer status", 
usblp->minor);
                                        retval = -EIO;
                                        goto done;
                                }
-                               status = lpstatus;
+                               status = *usblp->statusbuf;
                                if (copy_to_user ((int *)arg, &status, sizeof(int)))
                                        retval = -EFAULT;
                                break;



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to