All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Neuber <neuber@convergence.de>
To: linux-mtd@lists.infradead.org
Subject: FIX-Problem: use counter armflash.c
Date: Wed, 02 May 2001 17:36:06 +0200	[thread overview]
Message-ID: <3AF02966.9689ABA5@convergence.de> (raw)

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

             reply	other threads:[~2001-05-02 15:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-02 15:36 Frank Neuber [this message]
2001-05-02 15:55 ` FIX-Problem: use counter armflash.c David Woodhouse

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=3AF02966.9689ABA5@convergence.de \
    --to=neuber@convergence.de \
    --cc=linux-mtd@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.