[PATCH] usbfs: use the correct signal number for disconnection
authorZoran Marceta <Zoran.Marceta@micronasnit.com>
Thu, 22 Jun 2006 17:28:11 +0000 (13:28 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 12 Jul 2006 23:03:21 +0000 (16:03 -0700)
usbfs stores the wrong signal number in the siginfo structure used for
notifying user programs about device disconnect.  This patch (as726)
fixes it.

From: Zoran Marceta <Zoran.Marceta@micronasnit.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/inode.c

index f48c3dbc367ae4e97aa7919c15439a5c0207a9ed..3182c2224ba24f79c428242e431eaff03bbeba51 100644 (file)
@@ -695,7 +695,7 @@ static void usbfs_remove_device(struct usb_device *dev)
                wake_up_all(&ds->wait);
                list_del_init(&ds->list);
                if (ds->discsignr) {
-                       sinfo.si_signo = SIGPIPE;
+                       sinfo.si_signo = ds->discsignr;
                        sinfo.si_errno = EPIPE;
                        sinfo.si_code = SI_ASYNCIO;
                        sinfo.si_addr = ds->disccontext;