Commit 92504f79 authored by Randy Dunlap's avatar Randy Dunlap Committed by Linus Torvalds

IOATDMA: fix section mismatches

Rename struct pci_driver data so that false section mismatch warnings won't
be produced.

Sam, ISTM that depending on variable names is the weakest & worst part of
modpost section checking.  Should __init_refok work here?  I got build
errors when I tried to use it, probably because the struct pci_driver probe
and remove methods are not marked "__init_refok".

WARNING: drivers/dma/ioatdma.o(.data+0x10): Section mismatch: reference to .init.text: (between 'ioat_pci_drv' and 'ioat_pci_tbl')
WARNING: drivers/dma/ioatdma.o(.data+0x14): Section mismatch: reference to .exit.text: (between 'ioat_pci_drv' and 'ioat_pci_tbl')
Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
Acked-by: default avatarChris Leech <christopher.leech@intel.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 59faba1b
...@@ -556,7 +556,7 @@ static struct pci_device_id ioat_pci_tbl[] = { ...@@ -556,7 +556,7 @@ static struct pci_device_id ioat_pci_tbl[] = {
{ 0, } { 0, }
}; };
static struct pci_driver ioat_pci_drv = { static struct pci_driver ioat_pci_driver = {
.name = "ioatdma", .name = "ioatdma",
.id_table = ioat_pci_tbl, .id_table = ioat_pci_tbl,
.probe = ioat_probe, .probe = ioat_probe,
...@@ -699,7 +699,7 @@ static int __devinit ioat_probe(struct pci_dev *pdev, ...@@ -699,7 +699,7 @@ static int __devinit ioat_probe(struct pci_dev *pdev,
if (err) if (err)
goto err_set_dma_mask; goto err_set_dma_mask;
err = pci_request_regions(pdev, ioat_pci_drv.name); err = pci_request_regions(pdev, ioat_pci_driver.name);
if (err) if (err)
goto err_request_regions; goto err_request_regions;
...@@ -828,14 +828,14 @@ static int __init ioat_init_module(void) ...@@ -828,14 +828,14 @@ static int __init ioat_init_module(void)
/* if forced, worst case is that rmmod hangs */ /* if forced, worst case is that rmmod hangs */
__unsafe(THIS_MODULE); __unsafe(THIS_MODULE);
return pci_register_driver(&ioat_pci_drv); return pci_register_driver(&ioat_pci_driver);
} }
module_init(ioat_init_module); module_init(ioat_init_module);
static void __exit ioat_exit_module(void) static void __exit ioat_exit_module(void)
{ {
pci_unregister_driver(&ioat_pci_drv); pci_unregister_driver(&ioat_pci_driver);
} }
module_exit(ioat_exit_module); module_exit(ioat_exit_module);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment