On Tue, Sep 16, 2003 at 12:17:42AM +0200, Kronos wrote:
Il Mon, Sep 15, 2003 at 10:40:42PM +0100, Russell King ha scritto:
quoted
There is another reason why the above is fundamentally flawed - who says
that "release_cfb_info" will still be in module space by the time you
need to call it?
Eg, you unload your framebuffer driver module immediately after the device
has gone away, but someone is keeping the sysfs files associated with
the fb_info open.
I'm quite sure that this can't happen. If someone is keeping a sysfs
file open module use count won't be zero. Right?
Where are you handling the module use count of the framebuffer driver?
I'm also confused why you want to keep the device IO regions around
until all sysfs files have been closed. I hope you're not thinking
of touching the hardware after you've returned from the drivers
->remove method?
Is there somewhere I can view the core changes?
--
Russell King (rmk@arm.linux.org.uk) http://www.arm.linux.org.uk/personal/
Linux kernel maintainer of:
2.6 ARM Linux - http://www.arm.linux.org.uk/
2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Il Mon, Sep 15, 2003 at 11:58:32PM +0100, Russell King ha scritto:
On Tue, Sep 16, 2003 at 12:17:42AM +0200, Kronos wrote:
quoted
Il Mon, Sep 15, 2003 at 10:40:42PM +0100, Russell King ha scritto:
quoted
There is another reason why the above is fundamentally flawed - who says
that "release_cfb_info" will still be in module space by the time you
need to call it?
Eg, you unload your framebuffer driver module immediately after the device
has gone away, but someone is keeping the sysfs files associated with
the fb_info open.
I'm quite sure that this can't happen. If someone is keeping a sysfs
file open module use count won't be zero. Right?
Where are you handling the module use count of the framebuffer driver?
Every attribute (ie. sysfs file) has a .owner field (see
include/linux/sysfs.h), the module use count is handled by sysfs. If a
sysfs file is open the module can't be unloaded.
I'm also confused why you want to keep the device IO regions around
until all sysfs files have been closed. I hope you're not thinking
of touching the hardware after you've returned from the drivers
->remove method?
I tought that some sysfs file may use those things. I was sure that
class_dev hold a reference to pci_dev.dev, but that's not the case. So
yes, that's a bad idea. I'll move pci stuff in the unregister function.
Is there somewhere I can view the core changes?
They are on fbdev for review, I put a copy here:
http://web.tiscali.it/kronoz/linux/fbdev-class_dev-fbmem.c.diff
The patch is agains James Simmons tree.
Luca
--
Reply-To: kronos@kronoz.cjb.net
Home: http://kronoz.cjb.net
La vispa candela bruciava l'erbetta
creando un'essenza alquanto sospetta;
sembrava l'odore di una sacrestia
ma presto mi accorsi che era maria.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf