diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2007-05-08 03:36:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:24 -0400 |
commit | c2ad4c75154d98c07d30493e4906e1cd0a9162a5 (patch) | |
tree | 2fee0cbb78b08a1297892611cf3c43ae92179a34 /drivers/char | |
parent | 73b52572ab2eda9ea904d61e82f88c9a0e7aff41 (diff) |
Char: cyclades, use IS_CYC_Z macro
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/cyclades.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index 9d22d58f4298..d3b42e8d9ba9 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c | |||
@@ -3616,11 +3616,6 @@ static int cy_tiocmget(struct tty_struct *tty, struct file *file) | |||
3616 | ((status & CyCTS) ? TIOCM_CTS : 0); | 3616 | ((status & CyCTS) ? TIOCM_CTS : 0); |
3617 | } else { | 3617 | } else { |
3618 | base_addr = cy_card[card].base_addr; | 3618 | base_addr = cy_card[card].base_addr; |
3619 | |||
3620 | if (cy_card[card].num_chips != -1) { | ||
3621 | return -EINVAL; | ||
3622 | } | ||
3623 | |||
3624 | firm_id = cy_card[card].base_addr + ID_ADDRESS; | 3619 | firm_id = cy_card[card].base_addr + ID_ADDRESS; |
3625 | if (ISZLOADED(cy_card[card])) { | 3620 | if (ISZLOADED(cy_card[card])) { |
3626 | zfw_ctrl = cy_card[card].base_addr + | 3621 | zfw_ctrl = cy_card[card].base_addr + |
@@ -4513,7 +4508,7 @@ static void __devinit cy_init_card(struct cyclades_card *cinfo, | |||
4513 | unsigned short chip_number; | 4508 | unsigned short chip_number; |
4514 | int index, port; | 4509 | int index, port; |
4515 | 4510 | ||
4516 | if (cinfo->num_chips == -1) { /* Cyclades-Z */ | 4511 | if (IS_CYC_Z(*cinfo)) { /* Cyclades-Z */ |
4517 | mailbox = readl(&((struct RUNTIME_9060 __iomem *) | 4512 | mailbox = readl(&((struct RUNTIME_9060 __iomem *) |
4518 | cinfo->ctl_addr)->mail_box_0); | 4513 | cinfo->ctl_addr)->mail_box_0); |
4519 | nports = (mailbox == ZE_V1) ? ZE_V1_NPORTS : 8; | 4514 | nports = (mailbox == ZE_V1) ? ZE_V1_NPORTS : 8; |
@@ -5346,12 +5341,12 @@ static void __devexit cy_pci_release(struct pci_dev *pdev) | |||
5346 | unsigned int i; | 5341 | unsigned int i; |
5347 | 5342 | ||
5348 | /* non-Z with old PLX */ | 5343 | /* non-Z with old PLX */ |
5349 | if (cinfo->num_chips != -1 && (readb(cinfo->base_addr + CyPLX_VER) & | 5344 | if (!IS_CYC_Z(*cinfo) && (readb(cinfo->base_addr + CyPLX_VER) & 0x0f) == |
5350 | 0x0f) == PLX_9050) | 5345 | PLX_9050) |
5351 | cy_writeb(cinfo->ctl_addr + 0x4c, 0); | 5346 | cy_writeb(cinfo->ctl_addr + 0x4c, 0); |
5352 | else | 5347 | else |
5353 | #ifndef CONFIG_CYZ_INTR | 5348 | #ifndef CONFIG_CYZ_INTR |
5354 | if (cinfo->num_chips != -1) | 5349 | if (!IS_CYC_Z(*cinfo)) |
5355 | #endif | 5350 | #endif |
5356 | cy_writew(cinfo->ctl_addr + 0x68, | 5351 | cy_writew(cinfo->ctl_addr + 0x68, |
5357 | readw(cinfo->ctl_addr + 0x68) & ~0x0900); | 5352 | readw(cinfo->ctl_addr + 0x68) & ~0x0900); |
@@ -5361,7 +5356,7 @@ static void __devexit cy_pci_release(struct pci_dev *pdev) | |||
5361 | pci_iounmap(pdev, cinfo->ctl_addr); | 5356 | pci_iounmap(pdev, cinfo->ctl_addr); |
5362 | if (cinfo->irq | 5357 | if (cinfo->irq |
5363 | #ifndef CONFIG_CYZ_INTR | 5358 | #ifndef CONFIG_CYZ_INTR |
5364 | && cinfo->num_chips != -1 /* not a Z card */ | 5359 | && !IS_CYC_Z(*cinfo) |
5365 | #endif /* CONFIG_CYZ_INTR */ | 5360 | #endif /* CONFIG_CYZ_INTR */ |
5366 | ) | 5361 | ) |
5367 | free_irq(cinfo->irq, cinfo); | 5362 | free_irq(cinfo->irq, cinfo); |
@@ -5582,7 +5577,7 @@ static void __exit cy_cleanup_module(void) | |||
5582 | iounmap(cy_card[i].ctl_addr); | 5577 | iounmap(cy_card[i].ctl_addr); |
5583 | if (cy_card[i].irq | 5578 | if (cy_card[i].irq |
5584 | #ifndef CONFIG_CYZ_INTR | 5579 | #ifndef CONFIG_CYZ_INTR |
5585 | && cy_card[i].num_chips != -1 /* not a Z card */ | 5580 | && !IS_CYC_Z(cy_card[i]) |
5586 | #endif /* CONFIG_CYZ_INTR */ | 5581 | #endif /* CONFIG_CYZ_INTR */ |
5587 | ) | 5582 | ) |
5588 | free_irq(cy_card[i].irq, &cy_card[i]); | 5583 | free_irq(cy_card[i].irq, &cy_card[i]); |