Re: [PATCH] gx1fb: Fix section mismatch derived from gx1fb_driver variable

From: Paul Mundt
Date: Thu Jan 06 2011 - 01:41:12 EST


On Mon, Jan 03, 2011 at 02:31:29AM +0100, Sedat Dilek wrote:
> diff --git a/drivers/video/geode/gx1fb_core.c b/drivers/video/geode/gx1fb_core.c
> index c6b554f..9fdb115 100644
> --- a/drivers/video/geode/gx1fb_core.c
> +++ b/drivers/video/geode/gx1fb_core.c
> @@ -437,7 +437,7 @@ static struct pci_device_id gx1fb_id_table[] = {
>
> MODULE_DEVICE_TABLE(pci, gx1fb_id_table);
>
> -static struct pci_driver gx1fb_driver = {
> +static struct pci_driver gx1fb_driver __refdata = {
> .name = "gx1fb",
> .id_table = gx1fb_id_table,
> .probe = gx1fb_probe,

The problem seems to be because gx1fb_probe is annotated __init. In the
PCI case you want it to be __devinit, and you're also going to want to
annotate the remove function as __devexit and wrap it up with a
__devexit_p().
--
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/