Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-serial
[powerpc.git] / drivers / net / irda / nsc-ircc.c
index 81a4ccf..cb62f2a 100644 (file)
@@ -90,9 +90,9 @@ static int qos_mtt_bits = 0x07;  /* 1 ms or more */
 static int dongle_id;
 
 /* Use BIOS settions by default, but user may supply module parameters */
-static unsigned int io[]  = { ~0, ~0, ~0, ~0 };
-static unsigned int irq[] = {  0,  0,  0,  0 };
-static unsigned int dma[] = {  0,  0,  0,  0 };
+static unsigned int io[]  = { ~0, ~0, ~0, ~0, ~0 };
+static unsigned int irq[] = {  0,  0,  0,  0,  0 };
+static unsigned int dma[] = {  0,  0,  0,  0,  0 };
 
 static int nsc_ircc_probe_108(nsc_chip_t *chip, chipio_t *info);
 static int nsc_ircc_probe_338(nsc_chip_t *chip, chipio_t *info);
@@ -115,10 +115,16 @@ static nsc_chip_t chips[] = {
        /* Contributed by Jan Frey - IBM A30/A31 */
        { "PC8739x", { 0x2e, 0x4e, 0x0 }, 0x20, 0xea, 0xff, 
          nsc_ircc_probe_39x, nsc_ircc_init_39x },
+       /* IBM ThinkPads using PC8738x (T60/X60/Z60) */
+       { "IBM-PC8738x", { 0x2e, 0x4e, 0x0 }, 0x20, 0xf4, 0xff,
+         nsc_ircc_probe_39x, nsc_ircc_init_39x },
+       /* IBM ThinkPads using PC8394T (T43/R52/?) */
+       { "IBM-PC8394T", { 0x2e, 0x4e, 0x0 }, 0x20, 0xf9, 0xff,
+         nsc_ircc_probe_39x, nsc_ircc_init_39x },
        { NULL }
 };
 
-static struct nsc_ircc_cb *dev_self[] = { NULL, NULL, NULL, NULL };
+static struct nsc_ircc_cb *dev_self[] = { NULL, NULL, NULL, NULL, NULL };
 
 static char *dongle_types[] = {
        "Differential serial interface",
@@ -205,7 +211,7 @@ static int __init nsc_ircc_init(void)
        /* Register with PnP subsystem to detect disable ports */
        ret = pnp_register_driver(&nsc_ircc_pnp_driver);
 
-       if (ret >= 0)
+       if (!ret)
                pnp_registered = 1;
 
        ret = -ENODEV;
@@ -810,7 +816,7 @@ static int nsc_ircc_init_39x(nsc_chip_t *chip, chipio_t *info)
        int cfg_base = info->cfg_base;
        int enabled;
 
-       /* User is shure about his config... accept it. */
+       /* User is sure about his config... accept it. */
        IRDA_DEBUG(2, "%s(): nsc_ircc_init_39x (user settings): "
                   "io=0x%04x, irq=%d, dma=%d\n", 
                   __FUNCTION__, info->fir_base, info->irq, info->dma);