diff options
Diffstat (limited to 'drivers/staging/vme/devices/vme_pio2_core.c')
-rw-r--r-- | drivers/staging/vme/devices/vme_pio2_core.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/staging/vme/devices/vme_pio2_core.c b/drivers/staging/vme/devices/vme_pio2_core.c index 35c6ce5..4f3cdbc 100644 --- a/drivers/staging/vme/devices/vme_pio2_core.c +++ b/drivers/staging/vme/devices/vme_pio2_core.c @@ -90,7 +90,7 @@ static void pio2_int(int level, int vector, void *ptr) case 4: /* Channels 0 to 7 */ retval = vme_master_read(card->window, ®, 1, - PIO2_REGS_INT_STAT[vec - 1]); + PIO2_REGS_INT_STAT[vec - 1]); if (retval < 0) { dev_err(&card->vdev->dev, "Unable to read IRQ status register\n"); @@ -100,8 +100,8 @@ static void pio2_int(int level, int vector, void *ptr) channel = ((vec - 1) * 8) + i; if (reg & PIO2_CHANNEL_BIT[channel]) dev_info(&card->vdev->dev, - "Interrupt on I/O channel %d\n", - channel); + "Interrupt on I/O channel %d\n", + channel); } break; case 5: @@ -215,7 +215,7 @@ static int pio2_probe(struct vme_dev *vdev) u8 reg; int vec; - card = kzalloc(sizeof(struct pio2_card), GFP_KERNEL); + card = kzalloc(sizeof(*card), GFP_KERNEL); if (!card) { retval = -ENOMEM; goto err_struct; @@ -230,7 +230,7 @@ static int pio2_probe(struct vme_dev *vdev) card->vdev = vdev; for (i = 0; i < PIO2_VARIANT_LENGTH; i++) { - if (isdigit(card->variant[i]) == 0) { + if (!isdigit(card->variant[i])) { dev_err(&card->vdev->dev, "Variant invalid\n"); retval = -EINVAL; goto err_variant; @@ -289,7 +289,7 @@ static int pio2_probe(struct vme_dev *vdev) } retval = vme_master_set(card->window, 1, card->base, 0x10000, VME_A24, - (VME_SCT | VME_USER | VME_DATA), VME_D16); + VME_SCT | VME_USER | VME_DATA, VME_D16); if (retval) { dev_err(&card->vdev->dev, "Unable to configure VME master resource\n"); @@ -335,7 +335,7 @@ static int pio2_probe(struct vme_dev *vdev) /* Set VME vector */ retval = vme_master_write(card->window, &card->irq_vector, 1, - PIO2_REGS_VME_VECTOR); + PIO2_REGS_VME_VECTOR); if (retval < 0) return retval; @@ -343,7 +343,7 @@ static int pio2_probe(struct vme_dev *vdev) vec = card->irq_vector | PIO2_VME_VECTOR_SPUR; retval = vme_irq_request(vdev, card->irq_level, vec, - &pio2_int, (void *)card); + &pio2_int, card); if (retval < 0) { dev_err(&card->vdev->dev, "Unable to attach VME interrupt vector0x%x, level 0x%x\n", @@ -356,7 +356,7 @@ static int pio2_probe(struct vme_dev *vdev) vec = card->irq_vector | PIO2_VECTOR_BANK[i]; retval = vme_irq_request(vdev, card->irq_level, vec, - &pio2_int, (void *)card); + &pio2_int, card); if (retval < 0) { dev_err(&card->vdev->dev, "Unable to attach VME interrupt vector0x%x, level 0x%x\n", @@ -370,7 +370,7 @@ static int pio2_probe(struct vme_dev *vdev) vec = card->irq_vector | PIO2_VECTOR_CNTR[i]; retval = vme_irq_request(vdev, card->irq_level, vec, - &pio2_int, (void *)card); + &pio2_int, card); if (retval < 0) { dev_err(&card->vdev->dev, "Unable to attach VME interrupt vector0x%x, level 0x%x\n", @@ -397,7 +397,7 @@ static int pio2_probe(struct vme_dev *vdev) dev_set_drvdata(&card->vdev->dev, card); dev_info(&card->vdev->dev, - "PIO2 (variant %s) configured at 0x%lx\n", card->variant, + "PIO2 (variant %s) configured at 0x%lx\n", card->variant, card->base); return 0; |