lkml.org 
[lkml]   [2006]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Handling devices that don't have a bus
On Sat, Apr 01, 2006 at 11:46:26AM -0500, Alan Stern wrote:
> On Sat, 1 Apr 2006, Russell King wrote:
>
> > On Thu, Mar 30, 2006 at 03:45:50PM -0500, Alan Stern wrote:
> > > I recently tried running the dummy_hcd driver for the first time in a
> > > while, and it crashed when the gadget driver was unloaded. It turns out
> > > this was because the gadget's embedded struct device is registered without
> > > a bus, which triggers an oops when the device's driver is unbound. The
> > > oops could be fixed by doing this:
> >
> > Can you provide the oops itself please?
>
> No, I don't have it any more. But I can tell you exactly where the oops
> occurred. In __device_release_driver() (in drivers/base/dd.c), this line
> you added:
>
> if (dev->bus->remove)
>
> crashed because dev->bus was NULL. My patch changes the line to:
>
> if (dev->bus && dev->bus->remove)
>
> Any objection to that?

Nope.

> I think you have misunderstood my point.

Yes I did. Oops.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-03 14:22    [W:0.058 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site