Skip to content

Commit 0e833d8

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (40 commits) tg3: Fix tg3_skb_error_unmap() net: tracepoint of net_dev_xmit sees freed skb and causes panic drivers/net/can/flexcan.c: add missing clk_put net: dm9000: Get the chip in a known good state before enabling interrupts drivers/net/davinci_emac.c: add missing clk_put af-packet: Add flag to distinguish VID 0 from no-vlan. caif: Fix race when conditionally taking rtnl lock usbnet/cdc_ncm: add missing .reset_resume hook vlan: fix typo in vlan_dev_hard_start_xmit() net/ipv4: Check for mistakenly passed in non-IPv4 address iwl4965: correctly validate temperature value bluetooth l2cap: fix locking in l2cap_global_chan_by_psm ath9k: fix two more bugs in tx power cfg80211: don't drop p2p probe responses Revert "net: fix section mismatches" drivers/net/usb/catc.c: Fix potential deadlock in catc_ctrl_run() sctp: stop pending timers and purge queues when peer restart asoc drivers/net: ks8842 Fix crash on received packet when in PIO mode. ip_options_compile: properly handle unaligned pointer iwlagn: fix incorrect PCI subsystem id for 6150 devices ...
2 parents 4f1ba49 + 7b29dc2 commit 0e833d8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+380
-219
lines changed

drivers/net/3c509.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ static int max_interrupt_work = 10;
185185
static int nopnp;
186186
#endif
187187

188-
static int el3_common_init(struct net_device *dev);
188+
static int __devinit el3_common_init(struct net_device *dev);
189189
static void el3_common_remove(struct net_device *dev);
190190
static ushort id_read_eeprom(int index);
191191
static ushort read_eeprom(int ioaddr, int index);
@@ -395,7 +395,7 @@ static struct isa_driver el3_isa_driver = {
395395
static int isa_registered;
396396

397397
#ifdef CONFIG_PNP
398-
static const struct pnp_device_id el3_pnp_ids[] __devinitconst = {
398+
static struct pnp_device_id el3_pnp_ids[] = {
399399
{ .id = "TCM5090" }, /* 3Com Etherlink III (TP) */
400400
{ .id = "TCM5091" }, /* 3Com Etherlink III */
401401
{ .id = "TCM5094" }, /* 3Com Etherlink III (combo) */
@@ -478,7 +478,7 @@ static int pnp_registered;
478478
#endif /* CONFIG_PNP */
479479

480480
#ifdef CONFIG_EISA
481-
static const struct eisa_device_id el3_eisa_ids[] __devinitconst = {
481+
static struct eisa_device_id el3_eisa_ids[] = {
482482
{ "TCM5090" },
483483
{ "TCM5091" },
484484
{ "TCM5092" },
@@ -508,7 +508,7 @@ static int eisa_registered;
508508
#ifdef CONFIG_MCA
509509
static int el3_mca_probe(struct device *dev);
510510

511-
static const short el3_mca_adapter_ids[] __devinitconst = {
511+
static short el3_mca_adapter_ids[] __initdata = {
512512
0x627c,
513513
0x627d,
514514
0x62db,
@@ -517,7 +517,7 @@ static const short el3_mca_adapter_ids[] __devinitconst = {
517517
0x0000
518518
};
519519

520-
static const char *const el3_mca_adapter_names[] __devinitconst = {
520+
static char *el3_mca_adapter_names[] __initdata = {
521521
"3Com 3c529 EtherLink III (10base2)",
522522
"3Com 3c529 EtherLink III (10baseT)",
523523
"3Com 3c529 EtherLink III (test mode)",
@@ -601,7 +601,7 @@ static void el3_common_remove (struct net_device *dev)
601601
}
602602

603603
#ifdef CONFIG_MCA
604-
static int __devinit el3_mca_probe(struct device *device)
604+
static int __init el3_mca_probe(struct device *device)
605605
{
606606
/* Based on Erik Nygren's (nygren@mit.edu) 3c529 patch,
607607
* heavily modified by Chris Beauregard
@@ -671,7 +671,7 @@ static int __devinit el3_mca_probe(struct device *device)
671671
#endif /* CONFIG_MCA */
672672

673673
#ifdef CONFIG_EISA
674-
static int __devinit el3_eisa_probe (struct device *device)
674+
static int __init el3_eisa_probe (struct device *device)
675675
{
676676
short i;
677677
int ioaddr, irq, if_port;

drivers/net/3c59x.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -901,14 +901,14 @@ static const struct dev_pm_ops vortex_pm_ops = {
901901
#endif /* !CONFIG_PM */
902902

903903
#ifdef CONFIG_EISA
904-
static const struct eisa_device_id vortex_eisa_ids[] __devinitconst = {
904+
static struct eisa_device_id vortex_eisa_ids[] = {
905905
{ "TCM5920", CH_3C592 },
906906
{ "TCM5970", CH_3C597 },
907907
{ "" }
908908
};
909909
MODULE_DEVICE_TABLE(eisa, vortex_eisa_ids);
910910

911-
static int __devinit vortex_eisa_probe(struct device *device)
911+
static int __init vortex_eisa_probe(struct device *device)
912912
{
913913
void __iomem *ioaddr;
914914
struct eisa_device *edev;

drivers/net/can/flexcan.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ static int __devinit flexcan_probe(struct platform_device *pdev)
923923
mem_size = resource_size(mem);
924924
if (!request_mem_region(mem->start, mem_size, pdev->name)) {
925925
err = -EBUSY;
926-
goto failed_req;
926+
goto failed_get;
927927
}
928928

929929
base = ioremap(mem->start, mem_size);
@@ -977,9 +977,8 @@ static int __devinit flexcan_probe(struct platform_device *pdev)
977977
iounmap(base);
978978
failed_map:
979979
release_mem_region(mem->start, mem_size);
980-
failed_req:
981-
clk_put(clk);
982980
failed_get:
981+
clk_put(clk);
983982
failed_clock:
984983
return err;
985984
}

drivers/net/davinci_emac.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,8 +1781,8 @@ static int __devinit davinci_emac_probe(struct platform_device *pdev)
17811781
ndev = alloc_etherdev(sizeof(struct emac_priv));
17821782
if (!ndev) {
17831783
dev_err(&pdev->dev, "error allocating net_device\n");
1784-
clk_put(emac_clk);
1785-
return -ENOMEM;
1784+
rc = -ENOMEM;
1785+
goto free_clk;
17861786
}
17871787

17881788
platform_set_drvdata(pdev, ndev);
@@ -1796,7 +1796,8 @@ static int __devinit davinci_emac_probe(struct platform_device *pdev)
17961796
pdata = pdev->dev.platform_data;
17971797
if (!pdata) {
17981798
dev_err(&pdev->dev, "no platform data\n");
1799-
return -ENODEV;
1799+
rc = -ENODEV;
1800+
goto probe_quit;
18001801
}
18011802

18021803
/* MAC addr and PHY mask , RMII enable info from platform_data */
@@ -1929,8 +1930,9 @@ static int __devinit davinci_emac_probe(struct platform_device *pdev)
19291930
iounmap(priv->remap_addr);
19301931

19311932
probe_quit:
1932-
clk_put(emac_clk);
19331933
free_netdev(ndev);
1934+
free_clk:
1935+
clk_put(emac_clk);
19341936
return rc;
19351937
}
19361938

drivers/net/depca.c

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -331,18 +331,18 @@ static struct {
331331
"DE422",\
332332
""}
333333

334-
static const char* const depca_signature[] __devinitconst = DEPCA_SIGNATURE;
334+
static char* __initdata depca_signature[] = DEPCA_SIGNATURE;
335335

336336
enum depca_type {
337337
DEPCA, de100, de101, de200, de201, de202, de210, de212, de422, unknown
338338
};
339339

340-
static const char depca_string[] = "depca";
340+
static char depca_string[] = "depca";
341341

342342
static int depca_device_remove (struct device *device);
343343

344344
#ifdef CONFIG_EISA
345-
static const struct eisa_device_id depca_eisa_ids[] __devinitconst = {
345+
static struct eisa_device_id depca_eisa_ids[] = {
346346
{ "DEC4220", de422 },
347347
{ "" }
348348
};
@@ -367,19 +367,19 @@ static struct eisa_driver depca_eisa_driver = {
367367
#define DE210_ID 0x628d
368368
#define DE212_ID 0x6def
369369

370-
static const short depca_mca_adapter_ids[] __devinitconst = {
370+
static short depca_mca_adapter_ids[] = {
371371
DE210_ID,
372372
DE212_ID,
373373
0x0000
374374
};
375375

376-
static const char *depca_mca_adapter_name[] = {
376+
static char *depca_mca_adapter_name[] = {
377377
"DEC EtherWORKS MC Adapter (DE210)",
378378
"DEC EtherWORKS MC Adapter (DE212)",
379379
NULL
380380
};
381381

382-
static const enum depca_type depca_mca_adapter_type[] = {
382+
static enum depca_type depca_mca_adapter_type[] = {
383383
de210,
384384
de212,
385385
0
@@ -541,9 +541,10 @@ static void SetMulticastFilter(struct net_device *dev);
541541
static int load_packet(struct net_device *dev, struct sk_buff *skb);
542542
static void depca_dbg_open(struct net_device *dev);
543543

544-
static const u_char de1xx_irq[] __devinitconst = { 2, 3, 4, 5, 7, 9, 0 };
545-
static const u_char de2xx_irq[] __devinitconst = { 5, 9, 10, 11, 15, 0 };
546-
static const u_char de422_irq[] __devinitconst = { 5, 9, 10, 11, 0 };
544+
static u_char de1xx_irq[] __initdata = { 2, 3, 4, 5, 7, 9, 0 };
545+
static u_char de2xx_irq[] __initdata = { 5, 9, 10, 11, 15, 0 };
546+
static u_char de422_irq[] __initdata = { 5, 9, 10, 11, 0 };
547+
static u_char *depca_irq;
547548

548549
static int irq;
549550
static int io;
@@ -579,7 +580,7 @@ static const struct net_device_ops depca_netdev_ops = {
579580
.ndo_validate_addr = eth_validate_addr,
580581
};
581582

582-
static int __devinit depca_hw_init (struct net_device *dev, struct device *device)
583+
static int __init depca_hw_init (struct net_device *dev, struct device *device)
583584
{
584585
struct depca_private *lp;
585586
int i, j, offset, netRAM, mem_len, status = 0;
@@ -747,7 +748,6 @@ static int __devinit depca_hw_init (struct net_device *dev, struct device *devic
747748
if (dev->irq < 2) {
748749
unsigned char irqnum;
749750
unsigned long irq_mask, delay;
750-
const u_char *depca_irq;
751751

752752
irq_mask = probe_irq_on();
753753

@@ -770,7 +770,6 @@ static int __devinit depca_hw_init (struct net_device *dev, struct device *devic
770770
break;
771771

772772
default:
773-
depca_irq = NULL;
774773
break; /* Not reached */
775774
}
776775

@@ -1303,7 +1302,7 @@ static void SetMulticastFilter(struct net_device *dev)
13031302
}
13041303
}
13051304

1306-
static int __devinit depca_common_init (u_long ioaddr, struct net_device **devp)
1305+
static int __init depca_common_init (u_long ioaddr, struct net_device **devp)
13071306
{
13081307
int status = 0;
13091308

@@ -1334,7 +1333,7 @@ static int __devinit depca_common_init (u_long ioaddr, struct net_device **devp)
13341333
/*
13351334
** Microchannel bus I/O device probe
13361335
*/
1337-
static int __devinit depca_mca_probe(struct device *device)
1336+
static int __init depca_mca_probe(struct device *device)
13381337
{
13391338
unsigned char pos[2];
13401339
unsigned char where;
@@ -1458,7 +1457,7 @@ static int __devinit depca_mca_probe(struct device *device)
14581457
** ISA bus I/O device probe
14591458
*/
14601459

1461-
static void __devinit depca_platform_probe (void)
1460+
static void __init depca_platform_probe (void)
14621461
{
14631462
int i;
14641463
struct platform_device *pldev;
@@ -1498,7 +1497,7 @@ static void __devinit depca_platform_probe (void)
14981497
}
14991498
}
15001499

1501-
static enum depca_type __devinit depca_shmem_probe (ulong *mem_start)
1500+
static enum depca_type __init depca_shmem_probe (ulong *mem_start)
15021501
{
15031502
u_long mem_base[] = DEPCA_RAM_BASE_ADDRESSES;
15041503
enum depca_type adapter = unknown;
@@ -1559,7 +1558,7 @@ static int __devinit depca_isa_probe (struct platform_device *device)
15591558
*/
15601559

15611560
#ifdef CONFIG_EISA
1562-
static int __devinit depca_eisa_probe (struct device *device)
1561+
static int __init depca_eisa_probe (struct device *device)
15631562
{
15641563
enum depca_type adapter = unknown;
15651564
struct eisa_device *edev;
@@ -1630,7 +1629,7 @@ static int __devexit depca_device_remove (struct device *device)
16301629
** and Boot (readb) ROM. This will also give us a clue to the network RAM
16311630
** base address.
16321631
*/
1633-
static int __devinit DepcaSignature(char *name, u_long base_addr)
1632+
static int __init DepcaSignature(char *name, u_long base_addr)
16341633
{
16351634
u_int i, j, k;
16361635
void __iomem *ptr;

drivers/net/dm9000.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,9 +1157,6 @@ dm9000_open(struct net_device *dev)
11571157

11581158
irqflags |= IRQF_SHARED;
11591159

1160-
if (request_irq(dev->irq, dm9000_interrupt, irqflags, dev->name, dev))
1161-
return -EAGAIN;
1162-
11631160
/* GPIO0 on pre-activate PHY, Reg 1F is not set by reset */
11641161
iow(db, DM9000_GPR, 0); /* REG_1F bit0 activate phyxcer */
11651162
mdelay(1); /* delay needs by DM9000B */
@@ -1168,6 +1165,9 @@ dm9000_open(struct net_device *dev)
11681165
dm9000_reset(db);
11691166
dm9000_init_dm9000(dev);
11701167

1168+
if (request_irq(dev->irq, dm9000_interrupt, irqflags, dev->name, dev))
1169+
return -EAGAIN;
1170+
11711171
/* Init driver variable */
11721172
db->dbug_cnt = 0;
11731173

drivers/net/hp100.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,14 @@ struct hp100_private {
188188
* variables
189189
*/
190190
#ifdef CONFIG_ISA
191-
static const char *const hp100_isa_tbl[] __devinitconst = {
191+
static const char *hp100_isa_tbl[] = {
192192
"HWPF150", /* HP J2573 rev A */
193193
"HWP1950", /* HP J2573 */
194194
};
195195
#endif
196196

197197
#ifdef CONFIG_EISA
198-
static const struct eisa_device_id hp100_eisa_tbl[] __devinitconst = {
198+
static struct eisa_device_id hp100_eisa_tbl[] = {
199199
{ "HWPF180" }, /* HP J2577 rev A */
200200
{ "HWP1920" }, /* HP 27248B */
201201
{ "HWP1940" }, /* HP J2577 */
@@ -336,7 +336,7 @@ static __devinit const char *hp100_read_id(int ioaddr)
336336
}
337337

338338
#ifdef CONFIG_ISA
339-
static __devinit int hp100_isa_probe1(struct net_device *dev, int ioaddr)
339+
static __init int hp100_isa_probe1(struct net_device *dev, int ioaddr)
340340
{
341341
const char *sig;
342342
int i;
@@ -372,7 +372,7 @@ static __devinit int hp100_isa_probe1(struct net_device *dev, int ioaddr)
372372
* EISA and PCI are handled by device infrastructure.
373373
*/
374374

375-
static int __devinit hp100_isa_probe(struct net_device *dev, int addr)
375+
static int __init hp100_isa_probe(struct net_device *dev, int addr)
376376
{
377377
int err = -ENODEV;
378378

@@ -396,7 +396,7 @@ static int __devinit hp100_isa_probe(struct net_device *dev, int addr)
396396
#endif /* CONFIG_ISA */
397397

398398
#if !defined(MODULE) && defined(CONFIG_ISA)
399-
struct net_device * __devinit hp100_probe(int unit)
399+
struct net_device * __init hp100_probe(int unit)
400400
{
401401
struct net_device *dev = alloc_etherdev(sizeof(struct hp100_private));
402402
int err;
@@ -2843,7 +2843,7 @@ static void cleanup_dev(struct net_device *d)
28432843
}
28442844

28452845
#ifdef CONFIG_EISA
2846-
static int __devinit hp100_eisa_probe (struct device *gendev)
2846+
static int __init hp100_eisa_probe (struct device *gendev)
28472847
{
28482848
struct net_device *dev = alloc_etherdev(sizeof(struct hp100_private));
28492849
struct eisa_device *edev = to_eisa_device(gendev);

drivers/net/ibmlana.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -895,12 +895,12 @@ static int ibmlana_irq;
895895
static int ibmlana_io;
896896
static int startslot; /* counts through slots when probing multiple devices */
897897

898-
static const short ibmlana_adapter_ids[] __devinitconst = {
898+
static short ibmlana_adapter_ids[] __initdata = {
899899
IBM_LANA_ID,
900900
0x0000
901901
};
902902

903-
static const char *const ibmlana_adapter_names[] __devinitconst = {
903+
static char *ibmlana_adapter_names[] __devinitdata = {
904904
"IBM LAN Adapter/A",
905905
NULL
906906
};

0 commit comments

Comments
 (0)