aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/depca.c
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2011-04-18 09:31:20 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-19 01:59:04 -0400
commite5cb966c0838e4da43a3b0751bdcac7fe719f7b4 (patch)
treef12e281104fd5dddad3dad15cf6df6151427ec6e /drivers/net/depca.c
parent2b7b431858c284b62c18baaf2cea571be2797d5a (diff)
net: fix section mismatches
Fix build warnings like the following: WARNING: drivers/net/built-in.o(.data+0x12434): Section mismatch in reference from the variable madgemc_driver to the variable .init.data:madgemc_adapter_ids And add some consts to EISA device ID tables along the way. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/depca.c')
-rw-r--r--drivers/net/depca.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/drivers/net/depca.c b/drivers/net/depca.c
index 8b0084d17c8c..17654059922d 100644
--- a/drivers/net/depca.c
+++ b/drivers/net/depca.c
@@ -331,18 +331,18 @@ static struct {
331 "DE422",\ 331 "DE422",\
332 ""} 332 ""}
333 333
334static char* __initdata depca_signature[] = DEPCA_SIGNATURE; 334static const char* const depca_signature[] __devinitconst = DEPCA_SIGNATURE;
335 335
336enum depca_type { 336enum depca_type {
337 DEPCA, de100, de101, de200, de201, de202, de210, de212, de422, unknown 337 DEPCA, de100, de101, de200, de201, de202, de210, de212, de422, unknown
338}; 338};
339 339
340static char depca_string[] = "depca"; 340static const char depca_string[] = "depca";
341 341
342static int depca_device_remove (struct device *device); 342static int depca_device_remove (struct device *device);
343 343
344#ifdef CONFIG_EISA 344#ifdef CONFIG_EISA
345static struct eisa_device_id depca_eisa_ids[] = { 345static const struct eisa_device_id depca_eisa_ids[] __devinitconst = {
346 { "DEC4220", de422 }, 346 { "DEC4220", de422 },
347 { "" } 347 { "" }
348}; 348};
@@ -367,19 +367,19 @@ static struct eisa_driver depca_eisa_driver = {
367#define DE210_ID 0x628d 367#define DE210_ID 0x628d
368#define DE212_ID 0x6def 368#define DE212_ID 0x6def
369 369
370static short depca_mca_adapter_ids[] = { 370static const short depca_mca_adapter_ids[] __devinitconst = {
371 DE210_ID, 371 DE210_ID,
372 DE212_ID, 372 DE212_ID,
373 0x0000 373 0x0000
374}; 374};
375 375
376static char *depca_mca_adapter_name[] = { 376static const char *depca_mca_adapter_name[] = {
377 "DEC EtherWORKS MC Adapter (DE210)", 377 "DEC EtherWORKS MC Adapter (DE210)",
378 "DEC EtherWORKS MC Adapter (DE212)", 378 "DEC EtherWORKS MC Adapter (DE212)",
379 NULL 379 NULL
380}; 380};
381 381
382static enum depca_type depca_mca_adapter_type[] = { 382static const enum depca_type depca_mca_adapter_type[] = {
383 de210, 383 de210,
384 de212, 384 de212,
385 0 385 0
@@ -541,10 +541,9 @@ static void SetMulticastFilter(struct net_device *dev);
541static int load_packet(struct net_device *dev, struct sk_buff *skb); 541static int load_packet(struct net_device *dev, struct sk_buff *skb);
542static void depca_dbg_open(struct net_device *dev); 542static void depca_dbg_open(struct net_device *dev);
543 543
544static u_char de1xx_irq[] __initdata = { 2, 3, 4, 5, 7, 9, 0 }; 544static const u_char de1xx_irq[] __devinitconst = { 2, 3, 4, 5, 7, 9, 0 };
545static u_char de2xx_irq[] __initdata = { 5, 9, 10, 11, 15, 0 }; 545static const u_char de2xx_irq[] __devinitconst = { 5, 9, 10, 11, 15, 0 };
546static u_char de422_irq[] __initdata = { 5, 9, 10, 11, 0 }; 546static const u_char de422_irq[] __devinitconst = { 5, 9, 10, 11, 0 };
547static u_char *depca_irq;
548 547
549static int irq; 548static int irq;
550static int io; 549static int io;
@@ -580,7 +579,7 @@ static const struct net_device_ops depca_netdev_ops = {
580 .ndo_validate_addr = eth_validate_addr, 579 .ndo_validate_addr = eth_validate_addr,
581}; 580};
582 581
583static int __init depca_hw_init (struct net_device *dev, struct device *device) 582static int __devinit depca_hw_init (struct net_device *dev, struct device *device)
584{ 583{
585 struct depca_private *lp; 584 struct depca_private *lp;
586 int i, j, offset, netRAM, mem_len, status = 0; 585 int i, j, offset, netRAM, mem_len, status = 0;
@@ -748,6 +747,7 @@ static int __init depca_hw_init (struct net_device *dev, struct device *device)
748 if (dev->irq < 2) { 747 if (dev->irq < 2) {
749 unsigned char irqnum; 748 unsigned char irqnum;
750 unsigned long irq_mask, delay; 749 unsigned long irq_mask, delay;
750 const u_char *depca_irq;
751 751
752 irq_mask = probe_irq_on(); 752 irq_mask = probe_irq_on();
753 753
@@ -770,6 +770,7 @@ static int __init depca_hw_init (struct net_device *dev, struct device *device)
770 break; 770 break;
771 771
772 default: 772 default:
773 depca_irq = NULL;
773 break; /* Not reached */ 774 break; /* Not reached */
774 } 775 }
775 776
@@ -1302,7 +1303,7 @@ static void SetMulticastFilter(struct net_device *dev)
1302 } 1303 }
1303} 1304}
1304 1305
1305static int __init depca_common_init (u_long ioaddr, struct net_device **devp) 1306static int __devinit depca_common_init (u_long ioaddr, struct net_device **devp)
1306{ 1307{
1307 int status = 0; 1308 int status = 0;
1308 1309
@@ -1333,7 +1334,7 @@ static int __init depca_common_init (u_long ioaddr, struct net_device **devp)
1333/* 1334/*
1334** Microchannel bus I/O device probe 1335** Microchannel bus I/O device probe
1335*/ 1336*/
1336static int __init depca_mca_probe(struct device *device) 1337static int __devinit depca_mca_probe(struct device *device)
1337{ 1338{
1338 unsigned char pos[2]; 1339 unsigned char pos[2];
1339 unsigned char where; 1340 unsigned char where;
@@ -1457,7 +1458,7 @@ static int __init depca_mca_probe(struct device *device)
1457** ISA bus I/O device probe 1458** ISA bus I/O device probe
1458*/ 1459*/
1459 1460
1460static void __init depca_platform_probe (void) 1461static void __devinit depca_platform_probe (void)
1461{ 1462{
1462 int i; 1463 int i;
1463 struct platform_device *pldev; 1464 struct platform_device *pldev;
@@ -1497,7 +1498,7 @@ static void __init depca_platform_probe (void)
1497 } 1498 }
1498} 1499}
1499 1500
1500static enum depca_type __init depca_shmem_probe (ulong *mem_start) 1501static enum depca_type __devinit depca_shmem_probe (ulong *mem_start)
1501{ 1502{
1502 u_long mem_base[] = DEPCA_RAM_BASE_ADDRESSES; 1503 u_long mem_base[] = DEPCA_RAM_BASE_ADDRESSES;
1503 enum depca_type adapter = unknown; 1504 enum depca_type adapter = unknown;
@@ -1558,7 +1559,7 @@ static int __devinit depca_isa_probe (struct platform_device *device)
1558*/ 1559*/
1559 1560
1560#ifdef CONFIG_EISA 1561#ifdef CONFIG_EISA
1561static int __init depca_eisa_probe (struct device *device) 1562static int __devinit depca_eisa_probe (struct device *device)
1562{ 1563{
1563 enum depca_type adapter = unknown; 1564 enum depca_type adapter = unknown;
1564 struct eisa_device *edev; 1565 struct eisa_device *edev;
@@ -1629,7 +1630,7 @@ static int __devexit depca_device_remove (struct device *device)
1629** and Boot (readb) ROM. This will also give us a clue to the network RAM 1630** and Boot (readb) ROM. This will also give us a clue to the network RAM
1630** base address. 1631** base address.
1631*/ 1632*/
1632static int __init DepcaSignature(char *name, u_long base_addr) 1633static int __devinit DepcaSignature(char *name, u_long base_addr)
1633{ 1634{
1634 u_int i, j, k; 1635 u_int i, j, k;
1635 void __iomem *ptr; 1636 void __iomem *ptr;