diff options
Diffstat (limited to 'drivers/net/irda/smsc-ircc2.c')
-rw-r--r-- | drivers/net/irda/smsc-ircc2.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c index 198bf3bfa70f..1d249737f96f 100644 --- a/drivers/net/irda/smsc-ircc2.c +++ b/drivers/net/irda/smsc-ircc2.c | |||
@@ -79,11 +79,13 @@ MODULE_AUTHOR("Daniele Peri <peri@csai.unipa.it>"); | |||
79 | MODULE_DESCRIPTION("SMC IrCC SIR/FIR controller driver"); | 79 | MODULE_DESCRIPTION("SMC IrCC SIR/FIR controller driver"); |
80 | MODULE_LICENSE("GPL"); | 80 | MODULE_LICENSE("GPL"); |
81 | 81 | ||
82 | static int ircc_dma = 255; | 82 | #define DMA_INVAL 255 |
83 | static int ircc_dma = DMA_INVAL; | ||
83 | module_param(ircc_dma, int, 0); | 84 | module_param(ircc_dma, int, 0); |
84 | MODULE_PARM_DESC(ircc_dma, "DMA channel"); | 85 | MODULE_PARM_DESC(ircc_dma, "DMA channel"); |
85 | 86 | ||
86 | static int ircc_irq = 255; | 87 | #define IRQ_INVAL 255 |
88 | static int ircc_irq = IRQ_INVAL; | ||
87 | module_param(ircc_irq, int, 0); | 89 | module_param(ircc_irq, int, 0); |
88 | MODULE_PARM_DESC(ircc_irq, "IRQ line"); | 90 | MODULE_PARM_DESC(ircc_irq, "IRQ line"); |
89 | 91 | ||
@@ -646,7 +648,7 @@ static void smsc_ircc_setup_io(struct smsc_ircc_cb *self, | |||
646 | self->io.fifo_size = SMSC_IRCC2_FIFO_SIZE; | 648 | self->io.fifo_size = SMSC_IRCC2_FIFO_SIZE; |
647 | self->io.speed = SMSC_IRCC2_C_IRDA_FALLBACK_SPEED; | 649 | self->io.speed = SMSC_IRCC2_C_IRDA_FALLBACK_SPEED; |
648 | 650 | ||
649 | if (irq < 255) { | 651 | if (irq != IRQ_INVAL) { |
650 | if (irq != chip_irq) | 652 | if (irq != chip_irq) |
651 | IRDA_MESSAGE("%s, Overriding IRQ - chip says %d, using %d\n", | 653 | IRDA_MESSAGE("%s, Overriding IRQ - chip says %d, using %d\n", |
652 | driver_name, chip_irq, irq); | 654 | driver_name, chip_irq, irq); |
@@ -654,7 +656,7 @@ static void smsc_ircc_setup_io(struct smsc_ircc_cb *self, | |||
654 | } else | 656 | } else |
655 | self->io.irq = chip_irq; | 657 | self->io.irq = chip_irq; |
656 | 658 | ||
657 | if (dma < 255) { | 659 | if (dma != DMA_INVAL) { |
658 | if (dma != chip_dma) | 660 | if (dma != chip_dma) |
659 | IRDA_MESSAGE("%s, Overriding DMA - chip says %d, using %d\n", | 661 | IRDA_MESSAGE("%s, Overriding DMA - chip says %d, using %d\n", |
660 | driver_name, chip_dma, dma); | 662 | driver_name, chip_dma, dma); |
@@ -2836,9 +2838,9 @@ static int __init smsc_ircc_preconfigure_subsystems(unsigned short ircc_cfg, | |||
2836 | tmpconf.fir_io = ircc_fir; | 2838 | tmpconf.fir_io = ircc_fir; |
2837 | if (ircc_sir != 0) | 2839 | if (ircc_sir != 0) |
2838 | tmpconf.sir_io = ircc_sir; | 2840 | tmpconf.sir_io = ircc_sir; |
2839 | if (ircc_dma != 0xff) | 2841 | if (ircc_dma != DMA_INVAL) |
2840 | tmpconf.fir_dma = ircc_dma; | 2842 | tmpconf.fir_dma = ircc_dma; |
2841 | if (ircc_irq != 0xff) | 2843 | if (ircc_irq != IRQ_INVAL) |
2842 | tmpconf.fir_irq = ircc_irq; | 2844 | tmpconf.fir_irq = ircc_irq; |
2843 | 2845 | ||
2844 | IRDA_MESSAGE("Detected unconfigured %s SMSC IrDA chip, pre-configuring device.\n", conf->name); | 2846 | IRDA_MESSAGE("Detected unconfigured %s SMSC IrDA chip, pre-configuring device.\n", conf->name); |