From: Josh Boyer <jwboyer@gmail.com>
To: devzero@web.de
Cc: linux-kernel@vger.kernel.org, hidave.darkstar@gmail.com,
lcapitulino@mandriva.com.br, linux-mtd@lists.infradead.org,
randy.dunlap@oracle.com
Subject: Re: [PATCH]: 2.6.24-rc5: mtd: PNC-2000 oops
Date: Sun, 30 Dec 2007 08:05:52 -0600 [thread overview]
Message-ID: <20071230080552.744d5103@vader.jdub.homelinux.org> (raw)
In-Reply-To: <76599944@web.de>
On Sun, 30 Dec 2007 14:15:13 +0100
devzero@web.de wrote:
> while doing some systematical driver load/unload testing i have also come across this one.
>
> searched lkml and found/tried this patch - seems to work fine, at least driver now behaves as expected:
> insmod: error inserting 'pnc2000.ko': -1 No such device or address
>
> if it really _works_ is another story, but how can we know ? have searched the net a while for this hardware, but didn`t find _any_ reference that this hardware either exists or existed at all, so it looks that this hardware is very ancient or being used by japanese secret service, only !? :)
[snip]
> @@ -64,16 +63,29 @@ static struct mtd_info *mymtd;
>
> static int __init init_pnc2000(void)
> {
> + int err;
> +
> printk(KERN_NOTICE "Photron PNC-2000 flash mapping: %x at %x\n", WINDOW_SIZE, \
> WINDOW_ADDR);
> + pnc_map.virt = ioremap(WINDOW_ADDR, WINDOW_SIZE);
> + if (!pnc_map.virt) {
> + printk("init_pnc2000(): failed to ioremap\n");
> + return -EIO;
> + }
> +
> simple_map_init(&pnc_map);
>
> mymtd = do_map_probe("cfi_probe", &pnc_map);
> if (mymtd) {
> mymtd->owner = THIS_MODULE;
> - return add_mtd_partitions(mymtd, pnc_partitions, 3);
> + err = add_mtd_partitions(mymtd, pnc_partitions, 3);
> + if (err) {
> + printk("init_pnc2000(): add_mtd_partitions failed\n");
> + iounmap(pnc_map.virt);
> + }
> }
>
> + iounmap(pnc_map.virt);
> return -ENXIO;
Sorry, but no. This bit here is bogus. It will now iounmap and return
an error even if nothing went wrong.
josh
next prev parent reply other threads:[~2007-12-30 14:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-30 13:15 devzero
2007-12-30 14:05 ` Josh Boyer [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-12-13 17:04 Luiz Fernando N. Capitulino
2007-12-14 2:06 ` Dave Young
2007-12-14 16:00 ` [PATCH]: " Luiz Fernando N. Capitulino
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=20071230080552.744d5103@vader.jdub.homelinux.org \
--to=jwboyer@gmail.com \
--cc=devzero@web.de \
--cc=hidave.darkstar@gmail.com \
--cc=lcapitulino@mandriva.com.br \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=randy.dunlap@oracle.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®