All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Dmitry Torokhov <dtor_core@ameritech.net>,
	linux-usb-devel@lists.sourceforge.net, vojtech@suse.cz
Cc: Marcel Holtmann <marcel@holtmann.org>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org,
	Simon Kelley <simon@thekelleys.org.uk>
Subject: Re: [OOPS/HACK] atmel_cs and the latest changes in sysfs/symlink.c
Date: Fri, 23 Apr 2004 11:03:42 -0700	[thread overview]
Message-ID: <20040423180342.GA14533@kroah.com> (raw)
In-Reply-To: <20040423171953.GB13835@kroah.com>

On Fri, Apr 23, 2004 at 10:19:53AM -0700, Greg KH wrote:
> On Fri, Apr 23, 2004 at 08:31:11AM -0700, Greg KH wrote:
> > 
> > No, we need to oops, as that's a real bug.  Can you post the whole oops
> > that was generated with this usb problem?  I can't seem to duplicate
> > this here.
> 
> Nevermind I dug up a device here that causes this problem.  I'll track
> it down...

Ok, here's a patch that fixes it for me.  I was waiting for a good
reason to finally get rid of this fake usb_interface structure, and now
I have it :)

Let me know if it solves the problem for you too and then I'll send it
off to Linus.

Any objections Vojtech?

thanks,

greg k-h


# USB: fix up fake usb_interface structure in hiddev
#
# This fixes a oops in the current kernel tree.

diff -Nru a/drivers/usb/input/hiddev.c b/drivers/usb/input/hiddev.c
--- a/drivers/usb/input/hiddev.c	Fri Apr 23 11:00:23 2004
+++ b/drivers/usb/input/hiddev.c	Fri Apr 23 11:00:23 2004
@@ -53,7 +53,6 @@
 	wait_queue_head_t wait;
 	struct hid_device *hid;
 	struct hiddev_list *list;
-	struct usb_interface intf;
 };
 
 struct hiddev_list {
@@ -234,7 +233,7 @@
 static struct usb_class_driver hiddev_class;
 static void hiddev_cleanup(struct hiddev *hiddev)
 {
-	usb_deregister_dev(&hiddev->intf, &hiddev_class);
+	usb_deregister_dev(hiddev->hid->intf, &hiddev_class);
 	hiddev_table[hiddev->minor] = NULL;
 	kfree(hiddev);
 }
@@ -775,7 +774,7 @@
 		return -1;
 	memset(hiddev, 0, sizeof(struct hiddev));
 
- 	retval = usb_register_dev(&hiddev->intf, &hiddev_class);
+ 	retval = usb_register_dev(hid->intf, &hiddev_class);
 	if (retval) {
 		err("Not able to get a minor for this device.");
 		kfree(hiddev);
@@ -784,13 +783,13 @@
 
 	init_waitqueue_head(&hiddev->wait);
 
- 	hiddev->minor = hiddev->intf.minor;
- 	hiddev_table[hiddev->intf.minor - HIDDEV_MINOR_BASE] = hiddev;
+ 	hiddev->minor = hid->intf->minor;
+ 	hiddev_table[hid->intf->minor - HIDDEV_MINOR_BASE] = hiddev;
 
 	hiddev->hid = hid;
 	hiddev->exist = 1;
 
- 	hid->minor = hiddev->intf.minor;
+ 	hid->minor = hid->intf->minor;
 	hid->hiddev = hiddev;
 
 	return 0;

  reply	other threads:[~2004-04-23 18:04 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-23  6:42 [OOPS/HACK] atmel_cs and the latest changes in sysfs/symlink.c Dmitry Torokhov
2004-04-23 12:25 ` Marcel Holtmann
2004-04-23 13:02   ` Dmitry Torokhov
2004-04-23 14:26     ` Marcel Holtmann
2004-04-23 16:55       ` Dmitry Torokhov
2004-04-23 17:16         ` Greg KH
2004-04-23 18:50           ` Marcel Holtmann
2004-04-23 19:46             ` Greg KH
2004-04-23 20:35           ` Russell King
2004-04-23 21:02             ` Marcel Holtmann
2004-04-23 15:31     ` Greg KH
2004-04-23 17:19       ` Greg KH
2004-04-23 18:03         ` Greg KH [this message]
2004-04-24  6:44           ` Dmitry Torokhov
2004-04-25  2:49             ` Greg KH
2004-04-25 21:48               ` Dmitry Torokhov
2004-05-04 21:04                 ` Greg KH
2004-05-05  7:08                   ` Dmitry Torokhov
2004-05-07 23:25                     ` Greg KH
2004-04-26 10:19           ` Vojtech Pavlik
2004-04-23 19:55   ` Russell King
2004-04-23 20:14     ` Marcel Holtmann
2004-04-23 20:39       ` Russell King
2004-04-25 21:53         ` Dmitry Torokhov
2004-04-25 22:58           ` Russell King
2004-04-26 10:35             ` Marcel Holtmann
2004-04-26 12:32               ` Dmitry Torokhov
2004-04-26 13:09                 ` Marcel Holtmann
2004-04-27  5:57                   ` Dmitry Torokhov
2004-04-26 12:26             ` Dmitry Torokhov
2004-04-23 15:28 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040423180342.GA14533@kroah.com \
    --to=greg@kroah.com \
    --cc=akpm@osdl.org \
    --cc=dtor_core@ameritech.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=marcel@holtmann.org \
    --cc=simon@thekelleys.org.uk \
    --cc=vojtech@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.