From: George Kashperko <george@xxxxxxxxxxx> Modify irqflag routine to reuse tpsflag value rather than reading TPSFLAG register once again. Change default "not supported" value from 0x3F to -1. Signed-off-by: George Kashperko <george@xxxxxxxxxxx> --- drivers/ssb/driver_mipscore.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) --- linux-wireless-testing.orig/drivers/ssb/driver_mipscore.c 2011-02-17 14:07:23.000000000 +0200 +++ linux-wireless-testing/drivers/ssb/driver_mipscore.c 2011-02-17 14:11:09.000000000 +0200 @@ -54,12 +54,12 @@ static inline u32 ssb_irqflag(struct ssb static u32 ssb_irqflag_sb(struct ssb_device *dev) { - u32 tpsflag = ssb_read32(dev, SSB_TPSFLAG); - if (tpsflag) - return ssb_read32(dev, SSB_TPSFLAG) & SSB_TPSFLAG_BPFLAG; + u32 tpsflag = ssb_read32(dev, SSB_TPSFLAG) & SSB_TPSFLAG_BPFLAG; + if (tpsflag && tpsflag != SSB_TPSFLAG_BPFLAG) + return tpsflag; else /* not irq supported */ - return 0x3f; + return -1; } static struct ssb_device *find_device(struct ssb_device *rdev, int irqflag) @@ -90,7 +90,7 @@ unsigned int ssb_mips_irq(struct ssb_dev unsigned int irq; irqflag = ssb_irqflag(dev); - if (irqflag == 0x3f) + if (irqflag == -1) return 6; ipsflag = ssb_read32(bus->mipscore.dev, SSB_IPSFLAG); for (irq = 1; irq <= 4; irq++) { -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html