mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vojtech Pavlik <vojtech@suse.cz>
To: Greg KH <greg@kroah.com>
Cc: Dmitry Torokhov <dtor_core@ameritech.net>,
	linux-usb-devel@lists.sourceforge.net,
	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: Mon, 26 Apr 2004 12:19:08 +0200	[thread overview]
Message-ID: <20040426101908.GB2989@ucw.cz> (raw)
In-Reply-To: <20040423180342.GA14533@kroah.com>

On Fri, Apr 23, 2004 at 11:03:42AM -0700, Greg KH wrote:
> 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?

None. :)

> 
> 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;
> 

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

  parent reply	other threads:[~2004-04-26 10:19 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-23  6:42 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
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 [this message]
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=20040426101908.GB2989@ucw.cz \
    --to=vojtech@suse.cz \
    --cc=akpm@osdl.org \
    --cc=dtor_core@ameritech.net \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=marcel@holtmann.org \
    --cc=simon@thekelleys.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®