* FIX-Problem: use counter armflash.c
@ 2001-05-02 15:36 Frank Neuber
2001-05-02 15:55 ` David Woodhouse
0 siblings, 1 reply; 2+ messages in thread
From: Frank Neuber @ 2001-05-02 15:36 UTC (permalink / raw)
To: linux-mtd
Hi list,
I was playing with mtd's on an arm integrator board.
I think I found a bug in the clean up sequence of the module armflash.
The use counter never counts down when I unload the module armflash.
Here is my patch to correct this behavior:
---cut---
513,529d512
< int i;
< struct mtd_info *ret, *mtd;
<
< for (i=0; i < MAX_MTD_DEVICES; i++)
< {
< mtd = NULL;
< ret = __get_mtd_device(mtd, i);
<
< // printk("count down %d usecount %d\n",i, ret);
< if(ret!=NULL)
< {
< if(del_mtd_device(ret))
< {
< printk("cleanup %d failed\n",i);
< }
< }
< }
---cut---
There is another usecounter problem in armflash. In the afs_cfi_init()
function the
function do_map_probe() is called. After this call the usecount
of the module cfi_cmdset_0001 is incremented and would never be
decremented.
How can I fix this behaviour?
Is there anybody who is working with mtd's on arm-integrator?
regards
Frank
--
Dipl.-Ing. Elektrotechnik convergence integrated media gmbh / HW
Frank Neuber Rosenthalerstr.51 / 10178 Berlin
Email: neuber@convergence.de Phone: +49(0)30-72 62 06 50
WWW: www.convergence.de Fax: +49(0)30-72 62 06 55
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: FIX-Problem: use counter armflash.c
2001-05-02 15:36 FIX-Problem: use counter armflash.c Frank Neuber
@ 2001-05-02 15:55 ` David Woodhouse
0 siblings, 0 replies; 2+ messages in thread
From: David Woodhouse @ 2001-05-02 15:55 UTC (permalink / raw)
To: Frank Neuber; +Cc: linux-mtd
neuber@convergence.de said:
> The use counter never counts down when I unload the module armflash.
> Here is my patch to correct this behavior:
Not by deregistering every MTD device in the system, you don't :)
Make it remember which device(s) it owns instead.
neuber@convergence.de said:
> There is another usecounter problem in armflash. In the afs_cfi_init()
> function the function do_map_probe() is called. After this call the
> usecount of the module cfi_cmdset_0001 is incremented and would never
> be decremented. How can I fix this behaviour? Is there anybody who is
> working with mtd's on arm-integrator?
That one should be fixed now - I just have to fix up the command sets
accordingly.
--
dwmw2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-05-02 15:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-02 15:36 FIX-Problem: use counter armflash.c Frank Neuber
2001-05-02 15:55 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox