public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Ryan Jackson <rjackson@lnxi.com>
To: Artem Bityutskiy <dedekind@infradead.org>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] [MTD] MAPS: Support for BIOS flash chips on the nvidia ck804 southbridge
Date: Mon, 6 Nov 2006 16:32:52 -0700	[thread overview]
Message-ID: <20061106233252.GD8198@localdomain> (raw)
In-Reply-To: <1162399908.15435.16.camel@sauron>

* Artem Bityutskiy <dedekind@infradead.org> [061101 09:52]:
> I have few questions (may be silly) and comments.

Thanks for the feedback.  Sorry to take so long to reply.

> > +static int __devinit ck804xrom_init_one (struct pci_dev *pdev,
> > +	const struct pci_device_id *ent)
> I wonder why do you use __devinit here, not __init? AFAIK, __devinit is
> used for hotplug-able devices, is this the case for a video card?

Habit, I guess.  Technically the device isn't hotpluggable (unless you
consider ripping the chip off the board hot-plugging).  Some of the
other drivers seem to use __devinit as well, such as scb2_rom.

> > +	static char *rom_probe_types[] = { "cfi_probe", "jedec_probe", NULL };
> So the interface may really be JEDEC and CFI?

I haven't seen any chips used with this southbridge that are detected by
cfi_probe, but the probe is there in case one is used.

> map->map.virt is 'void *', so 
> 
> map->map.virt = window->virt + offset * sizeof(long);
> 
> could be used instead and it looks neater. In gcc sizeof(void) is 1 and
> is is widely used in the kernel.

Actually, I get an oops in jedec_probe_chip if I use this.

> Why you commented out pci_module_init() and the related stuff? Why you
> do not use this standard mechanism?

After talking with the original author, the reason pci_module_init (or
rather pci_register_driver) isn't called is simply a side-effect of
cut-and-paste from an another, earlier driver.  In that driver, it was
not called because A) the mtd code barely touches the device and B)
there was some other driver that wanted to use that device for something
else.

I've changed the code to register and unregister the driver and it seems
to work fine.  I'll re-submit it.

Thanks.

-- 
Ryan Jackson
Linux Networx

  reply	other threads:[~2006-11-06 23:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-31 23:56 [PATCH] [MTD] MAPS: Support for BIOS flash chips on the nvidia ck804 southbridge Ryan Jackson
2006-11-01 16:51 ` Artem Bityutskiy
2006-11-06 23:32   ` Ryan Jackson [this message]
2006-11-06 23:33   ` Ryan Jackson
  -- strict thread matches above, loose matches on Subject: below --
2006-10-23 21:35 Ryan Jackson
2006-10-24 11:47 ` Artem Bityutskiy
2006-10-24 17:44   ` Ryan Jackson

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=20061106233252.GD8198@localdomain \
    --to=rjackson@lnxi.com \
    --cc=dedekind@infradead.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox