Commit 315781408ef4a6ff831f8fd37c90d4bb7c234853
Committed by
Jeff Garzik
1 parent
83dad4c377
Exists in
master
and in
7 other branches
fs-enet: remove code associated with !CONFIG_PPC_MERGE
Now that arch/ppc is gone we don't need CONFIG_PPC_MERGE anymore remove the dead code associated with !CONFIG_PPC_MERGE. With this change the pre_request_irq() and post_free_irq() calls became nops so they have been removed. Also removed fs_request_irq() and fs_free_irq() and just called request_irq() and free_irq(). Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Jeff Garzik <jeff@garzik.org> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Showing 5 changed files with 3 additions and 89 deletions Side-by-side Diff
drivers/net/fs_enet/fs_enet-main.c
... | ... | @@ -664,23 +664,6 @@ |
664 | 664 | return NETDEV_TX_OK; |
665 | 665 | } |
666 | 666 | |
667 | -static int fs_request_irq(struct net_device *dev, int irq, const char *name, | |
668 | - irq_handler_t irqf) | |
669 | -{ | |
670 | - struct fs_enet_private *fep = netdev_priv(dev); | |
671 | - | |
672 | - (*fep->ops->pre_request_irq)(dev, irq); | |
673 | - return request_irq(irq, irqf, IRQF_SHARED, name, dev); | |
674 | -} | |
675 | - | |
676 | -static void fs_free_irq(struct net_device *dev, int irq) | |
677 | -{ | |
678 | - struct fs_enet_private *fep = netdev_priv(dev); | |
679 | - | |
680 | - free_irq(irq, dev); | |
681 | - (*fep->ops->post_free_irq)(dev, irq); | |
682 | -} | |
683 | - | |
684 | 667 | static void fs_timeout(struct net_device *dev) |
685 | 668 | { |
686 | 669 | struct fs_enet_private *fep = netdev_priv(dev); |
... | ... | @@ -800,7 +783,8 @@ |
800 | 783 | napi_enable(&fep->napi); |
801 | 784 | |
802 | 785 | /* Install our interrupt handler. */ |
803 | - r = fs_request_irq(dev, fep->interrupt, "fs_enet-mac", fs_enet_interrupt); | |
786 | + r = request_irq(fep->interrupt, fs_enet_interrupt, IRQF_SHARED, | |
787 | + "fs_enet-mac", dev); | |
804 | 788 | if (r != 0) { |
805 | 789 | printk(KERN_ERR DRV_MODULE_NAME |
806 | 790 | ": %s Could not allocate FS_ENET IRQ!", dev->name); |
... | ... | @@ -842,7 +826,7 @@ |
842 | 826 | /* release any irqs */ |
843 | 827 | phy_disconnect(fep->phydev); |
844 | 828 | fep->phydev = NULL; |
845 | - fs_free_irq(dev, fep->interrupt); | |
829 | + free_irq(fep->interrupt, dev); | |
846 | 830 | |
847 | 831 | return 0; |
848 | 832 | } |
drivers/net/fs_enet/fs_enet.h
... | ... | @@ -34,8 +34,6 @@ |
34 | 34 | void (*adjust_link)(struct net_device *dev); |
35 | 35 | void (*restart)(struct net_device *dev); |
36 | 36 | void (*stop)(struct net_device *dev); |
37 | - void (*pre_request_irq)(struct net_device *dev, int irq); | |
38 | - void (*post_free_irq)(struct net_device *dev, int irq); | |
39 | 37 | void (*napi_clear_rx_event)(struct net_device *dev); |
40 | 38 | void (*napi_enable_rx)(struct net_device *dev); |
41 | 39 | void (*napi_disable_rx)(struct net_device *dev); |
drivers/net/fs_enet/mac-fcc.c
... | ... | @@ -421,16 +421,6 @@ |
421 | 421 | fs_cleanup_bds(dev); |
422 | 422 | } |
423 | 423 | |
424 | -static void pre_request_irq(struct net_device *dev, int irq) | |
425 | -{ | |
426 | - /* nothing */ | |
427 | -} | |
428 | - | |
429 | -static void post_free_irq(struct net_device *dev, int irq) | |
430 | -{ | |
431 | - /* nothing */ | |
432 | -} | |
433 | - | |
434 | 424 | static void napi_clear_rx_event(struct net_device *dev) |
435 | 425 | { |
436 | 426 | struct fs_enet_private *fep = netdev_priv(dev); |
... | ... | @@ -540,8 +530,6 @@ |
540 | 530 | .set_multicast_list = set_multicast_list, |
541 | 531 | .restart = restart, |
542 | 532 | .stop = stop, |
543 | - .pre_request_irq = pre_request_irq, | |
544 | - .post_free_irq = post_free_irq, | |
545 | 533 | .napi_clear_rx_event = napi_clear_rx_event, |
546 | 534 | .napi_enable_rx = napi_enable_rx, |
547 | 535 | .napi_disable_rx = napi_disable_rx, |
drivers/net/fs_enet/mac-fec.c
... | ... | @@ -313,11 +313,7 @@ |
313 | 313 | * Clear any outstanding interrupt. |
314 | 314 | */ |
315 | 315 | FW(fecp, ievent, 0xffc0); |
316 | -#ifndef CONFIG_PPC_MERGE | |
317 | - FW(fecp, ivec, (fep->interrupt / 2) << 29); | |
318 | -#else | |
319 | 316 | FW(fecp, ivec, (virq_to_hw(fep->interrupt) / 2) << 29); |
320 | -#endif | |
321 | 317 | |
322 | 318 | /* |
323 | 319 | * adjust to speed (only for DUET & RMII) |
... | ... | @@ -413,30 +409,6 @@ |
413 | 409 | } |
414 | 410 | } |
415 | 411 | |
416 | -static void pre_request_irq(struct net_device *dev, int irq) | |
417 | -{ | |
418 | -#ifndef CONFIG_PPC_MERGE | |
419 | - immap_t *immap = fs_enet_immap; | |
420 | - u32 siel; | |
421 | - | |
422 | - /* SIU interrupt */ | |
423 | - if (irq >= SIU_IRQ0 && irq < SIU_LEVEL7) { | |
424 | - | |
425 | - siel = in_be32(&immap->im_siu_conf.sc_siel); | |
426 | - if ((irq & 1) == 0) | |
427 | - siel |= (0x80000000 >> irq); | |
428 | - else | |
429 | - siel &= ~(0x80000000 >> (irq & ~1)); | |
430 | - out_be32(&immap->im_siu_conf.sc_siel, siel); | |
431 | - } | |
432 | -#endif | |
433 | -} | |
434 | - | |
435 | -static void post_free_irq(struct net_device *dev, int irq) | |
436 | -{ | |
437 | - /* nothing */ | |
438 | -} | |
439 | - | |
440 | 412 | static void napi_clear_rx_event(struct net_device *dev) |
441 | 413 | { |
442 | 414 | struct fs_enet_private *fep = netdev_priv(dev); |
... | ... | @@ -529,8 +501,6 @@ |
529 | 501 | .set_multicast_list = set_multicast_list, |
530 | 502 | .restart = restart, |
531 | 503 | .stop = stop, |
532 | - .pre_request_irq = pre_request_irq, | |
533 | - .post_free_irq = post_free_irq, | |
534 | 504 | .napi_clear_rx_event = napi_clear_rx_event, |
535 | 505 | .napi_enable_rx = napi_enable_rx, |
536 | 506 | .napi_disable_rx = napi_disable_rx, |
drivers/net/fs_enet/mac-scc.c
... | ... | @@ -377,30 +377,6 @@ |
377 | 377 | fs_cleanup_bds(dev); |
378 | 378 | } |
379 | 379 | |
380 | -static void pre_request_irq(struct net_device *dev, int irq) | |
381 | -{ | |
382 | -#ifndef CONFIG_PPC_MERGE | |
383 | - immap_t *immap = fs_enet_immap; | |
384 | - u32 siel; | |
385 | - | |
386 | - /* SIU interrupt */ | |
387 | - if (irq >= SIU_IRQ0 && irq < SIU_LEVEL7) { | |
388 | - | |
389 | - siel = in_be32(&immap->im_siu_conf.sc_siel); | |
390 | - if ((irq & 1) == 0) | |
391 | - siel |= (0x80000000 >> irq); | |
392 | - else | |
393 | - siel &= ~(0x80000000 >> (irq & ~1)); | |
394 | - out_be32(&immap->im_siu_conf.sc_siel, siel); | |
395 | - } | |
396 | -#endif | |
397 | -} | |
398 | - | |
399 | -static void post_free_irq(struct net_device *dev, int irq) | |
400 | -{ | |
401 | - /* nothing */ | |
402 | -} | |
403 | - | |
404 | 380 | static void napi_clear_rx_event(struct net_device *dev) |
405 | 381 | { |
406 | 382 | struct fs_enet_private *fep = netdev_priv(dev); |
... | ... | @@ -494,8 +470,6 @@ |
494 | 470 | .set_multicast_list = set_multicast_list, |
495 | 471 | .restart = restart, |
496 | 472 | .stop = stop, |
497 | - .pre_request_irq = pre_request_irq, | |
498 | - .post_free_irq = post_free_irq, | |
499 | 473 | .napi_clear_rx_event = napi_clear_rx_event, |
500 | 474 | .napi_enable_rx = napi_enable_rx, |
501 | 475 | .napi_disable_rx = napi_disable_rx, |