Re: my first janitorial

From: Jiri Slaby
Date: Sun Apr 01 2007 - 14:29:21 EST


Alan Cox napsal(a):
> On Sat, 31 Mar 2007 22:24:12 -0700
> "Pedram M" <pmessri@xxxxxxxxx> wrote:
>
>> How about this one? Am I doing it right now?
>> If not, please try to explain more to me what I am
>> doing wrong.
>
> You need to hold a reference to the PCI device for the entire duration it
> is used. I think you actually also need something like this to get the whole
> thing using pci references and pci_get_* properly
>
> Alan
>
> --- drivers/char/cyclades.c~ 2007-04-01 15:52:16.000000000 +0100
> +++ drivers/char/cyclades.c 2007-04-01 15:52:16.000000000 +0100
> @@ -4803,7 +4782,7 @@
> cy_card[j].bus_index = 1;
> cy_card[j].first_line = cy_next_channel;
> cy_card[j].num_chips = cy_pci_nchan/4;
> - cy_card[j].pdev = pdev;
> + cy_card[j].pdev = pci_dev_get(pdev);

No, please let this code be, I have a bunch of patches to have pci_probing
for this driver, the remaining part for first set of patches is testing.

thanks,
--
http://www.fi.muni.cz/~xslaby/ Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8 22A0 32CC 55C3 39D4 7A7E

Hnus <hnus@xxxxxxxxxx> is an alias for /dev/null
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/