Messages in this thread | | | Date | Wed, 14 Sep 2005 10:38:47 -0700 | From | Greg KH <> | Subject | Re: [patch] hdaps driver update. |
| |
On Wed, Sep 14, 2005 at 12:31:57PM -0400, Robert Love wrote: > On Wed, 2005-09-14 at 09:16 -0700, Greg KH wrote: > > > But you are reference counting a static object, right? Which > > isn't the nicest thing to have done. > > I would not say it is not "the nicest thing", it is just not necessary > to do the reference counting. But we want the ref counting for other > reasons, so it seems sensible.
Like was mentioned, please use platform_device_register_simple() instead, that's what it is there for.
> > No, if you have that .owner field in your driver, you get a symlink in > > sysfs that points from your driver to the module that controls it. You > > just removed that symlink, which is not what I think you wanted to have > > happen :( > > But device release == module unload.
Sure.
> I am not following, sadly.
Load the version of the driver in 2.6.14-rc1. Look in the /sys/ directory for where your driver shows up. You should see a symlink called "module" in there that points back to /sys/module/ for where your module lives. That symlink was created by the fact that you had set the .owner field in the struct device_driver.
Taking that field away like you did removes that symlink, which is not a good thing.
thanks,
greg k-h - 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/
| |