mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 07:29:42 -05:00
starfire: use BUILD_BUG_ON for netdrv_addr_t
Detect size mismatch for netdrv_addr_t at build time rather than checking at module load time. Signed-off-by: Akinobu Mita <[email protected]> Cc: Ion Badulescu <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: [email protected] Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
d08336e999
commit
56543af956
1 changed files with 1 additions and 5 deletions
|
|
@ -2078,11 +2078,7 @@ static int __init starfire_init (void)
|
|||
printk(KERN_INFO DRV_NAME ": polling (NAPI) enabled\n");
|
||||
#endif
|
||||
|
||||
/* we can do this test only at run-time... sigh */
|
||||
if (sizeof(dma_addr_t) != sizeof(netdrv_addr_t)) {
|
||||
printk("This driver has dma_addr_t issues, please send email to maintainer\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
BUILD_BUG_ON(sizeof(dma_addr_t) != sizeof(netdrv_addr_t));
|
||||
|
||||
return pci_register_driver(&starfire_driver);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue