Pedram M 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 a changelog entry (or explanation of what you're doing). You need a signed-off-by line and your patch needs to apply to the root of the kernel tree with -p1, something like:

-------------
Replace deprecated pci_find_device call with pci_get_device.

Signed-Off-By: Pedram M <[EMAIL PROTECTED]>

--- linux-2.6.20.3.orig/path/to/file.c 2006-06-24 09:41:08.000000000 +0200
+++ linux-2.6.20.3/path/to/file.c       2006-07-15 21:01:57.000000000 +0200
@@ -4760,7 +4760,7 @@
        for (i = 0; i < NR_CARDS; i++) {
                /* look for a Cyclades card by vendor and device id */
                while ((device_id = cy_pci_dev_id[dev_index]) != 0) {
-                       if ((pdev = pci_find_device(PCI_VENDOR_ID_CYCLADES,
+                       if ((pdev = pci_get_device(PCI_VENDOR_ID_CYCLADES,
                                                   device_id, pdev)) == NULL) {
                                dev_index++;    /* try next device id */
                        } else {
-------------

And your subject needs to please include the string "[PATCH]", something like: [PATCH] path/to/file.c: pci_find_device cleanup

However, as pointed out, the code itself is incorrect, for every pci_get_device there also needs to be a call to pci_put_device in order to maintain reference counts.

Your client does not seem to be clobbering the patch itself and maintains tabs and line wrapping (unlike my client).

Jaco
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to