public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind@infradead.org>
To: Ryan Jackson <rjackson@lnxi.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] [MTD] MAPS: Support for BIOS flash chips on the nvidia ck804 southbridge
Date: Wed, 01 Nov 2006 18:51:48 +0200	[thread overview]
Message-ID: <1162399908.15435.16.camel@sauron> (raw)
In-Reply-To: <20061031235646.GE5968@localdomain>

Hello Rayan,

I have few questions (may be silly) and comments.

On Tue, 2006-10-31 at 16:56 -0700, Ryan Jackson wrote:
> +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?

> +{
> +	static char *rom_probe_types[] = { "cfi_probe", "jedec_probe", NULL };

So the interface may really be JEDEC and CFI?
> phys;
> +		map->map.virt = (void __iomem *)
> +			(((unsigned long)(window->virt)) + offset);
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.

> +static int __init init_ck804xrom(void)
> +{
> +	struct pci_dev *pdev;
> +	struct pci_device_id *id;
> +	int retVal;
> +	pdev = NULL;
> +
> +	for(id = ck804xrom_pci_tbl; id->vendor; id++) {
> +		pdev = pci_find_device(id->vendor, id->device, NULL);
> +		if (pdev)
> +			break;
> +	}
> +	if (pdev) {
> +		retVal = ck804xrom_init_one(pdev, &ck804xrom_pci_tbl[0]);
> +		pci_dev_put(pdev);
> +		return retVal;
> +	}
> +	return -ENXIO;
> +#if 0
> +	return pci_module_init(&ck804xrom_driver);
> +#endif

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

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

  reply	other threads:[~2006-11-01 16:52 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 [this message]
2006-11-06 23:32   ` Ryan Jackson
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=1162399908.15435.16.camel@sauron \
    --to=dedekind@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=rjackson@lnxi.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