Re: [PATCH -mm2] net: Fix compiler-error on dgrs.c when !CONFIG_PCI

From: Richard Knutsson
Date: Mon Nov 21 2005 - 18:15:21 EST


Herbert Xu wrote:

Richard Knutsson <ricknu-0@xxxxxxxxxxxxxx> wrote:


We need it even if pci_register_driver() and pci_register_driver() is empty shells. And instead of removing #endif CONFIG_PCI for


I don't think so. Please see my previous patch where pci_register_driver
is not called at all if CONFIG_PCI is not defined.

Cheers,


Yes, I know you patch don't need it (thought you commented the patch vs. dgrs.c, not vs. you patch). But to do that, you have to introduce a new dgrs-specific pci-layer to compensate. If you don't want to have an empty struct, is it not nicer/easier to just #ifdef CONFIG_PCI the pci_*-functions? (instead of two inline functions for every used pci_*-function?)

Am thinking of removing the #ifdef CONFIG_PCI's in other files, to "clean up" the code, but that would introduce this problem again, don't you think it is more readable to make an empty struct when !CONFIG_PCI, then making new pci_*-functions specific to the driver?

cu

-
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/