Skip to content

Commit

Permalink
Use compatibility definition for IRQF_SHARED
Browse files Browse the repository at this point in the history
IRQF_SHARED appeared in Linux 2.6.18.  Define it in compat.h for older
kernels.  Stop using obsolete SA_SHIRQ in if_ath_ahb.c and if_ath_pci.c

This fixes compilation of if_ath_ahb.c for Linux 2.6.22 and newer.


git-svn-id: http:https://madwifi-project.org/svn/madwifi/trunk@3041 0192ed92-7a03-0410-a25b-9323aeb14dbd
  • Loading branch information
proski committed Dec 13, 2007
1 parent 10560f6 commit d7fcb75
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ath/if_ath_ahb.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ init_ath_wmac(u_int16_t devid, u_int16_t wlanNum, struct ar531x_config *config)
sc->aps_sc.sc_iobase = (void __iomem *) dev->mem_start;
sc->aps_sc.sc_bdev = NULL;

if (request_irq(dev->irq, ath_intr, SA_SHIRQ, dev->name, dev)) {
if (request_irq(dev->irq, ath_intr, IRQF_SHARED, dev->name, dev)) {
printk(KERN_WARNING "%s: request_irq failed\n", dev->name);
goto bad3;
}
Expand Down
5 changes: 0 additions & 5 deletions ath/if_ath_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,7 @@ ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)

pci_set_drvdata(pdev, dev);

#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
if (request_irq(dev->irq, ath_intr, IRQF_SHARED, dev->name, dev)) {
#else
if (request_irq(dev->irq, ath_intr, SA_SHIRQ, dev->name, dev)) {
#endif

printk(KERN_WARNING "%s: request_irq failed\n", dev->name);
goto bad3;
}
Expand Down
4 changes: 4 additions & 0 deletions include/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ static inline int timeval_compare(struct timeval *lhs, struct timeval *rhs)
}
#endif

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
#define IRQF_SHARED SA_SHIRQ
#endif

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
#define skb_end_pointer(_skb) ((_skb)->end)
#define skb_tail_pointer(_skb) ((_skb)->tail)
Expand Down

0 comments on commit d7fcb75

Please sign in to comment.