mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-22 17:01:14 +00:00
drivers: staging: vme: Fixed indention
Signed-off-by: Egor Uleyskiy <egor.ulieiskii@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7f60809750
commit
24e394b08e
3 changed files with 21 additions and 21 deletions
|
@ -61,7 +61,7 @@ int pio2_cntr_reset(struct pio2_card *card)
|
||||||
/* Ensure all counter interrupts are cleared */
|
/* Ensure all counter interrupts are cleared */
|
||||||
do {
|
do {
|
||||||
retval = vme_master_read(card->window, ®, 1,
|
retval = vme_master_read(card->window, ®, 1,
|
||||||
PIO2_REGS_INT_STAT_CNTR);
|
PIO2_REGS_INT_STAT_CNTR);
|
||||||
if (retval < 0)
|
if (retval < 0)
|
||||||
return retval;
|
return retval;
|
||||||
} while (reg != 0);
|
} while (reg != 0);
|
||||||
|
|
|
@ -90,7 +90,7 @@ static void pio2_int(int level, int vector, void *ptr)
|
||||||
case 4:
|
case 4:
|
||||||
/* Channels 0 to 7 */
|
/* Channels 0 to 7 */
|
||||||
retval = vme_master_read(card->window, ®, 1,
|
retval = vme_master_read(card->window, ®, 1,
|
||||||
PIO2_REGS_INT_STAT[vec - 1]);
|
PIO2_REGS_INT_STAT[vec - 1]);
|
||||||
if (retval < 0) {
|
if (retval < 0) {
|
||||||
dev_err(&card->vdev->dev,
|
dev_err(&card->vdev->dev,
|
||||||
"Unable to read IRQ status register\n");
|
"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;
|
channel = ((vec - 1) * 8) + i;
|
||||||
if (reg & PIO2_CHANNEL_BIT[channel])
|
if (reg & PIO2_CHANNEL_BIT[channel])
|
||||||
dev_info(&card->vdev->dev,
|
dev_info(&card->vdev->dev,
|
||||||
"Interrupt on I/O channel %d\n",
|
"Interrupt on I/O channel %d\n",
|
||||||
channel);
|
channel);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
|
@ -289,7 +289,7 @@ static int pio2_probe(struct vme_dev *vdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
retval = vme_master_set(card->window, 1, card->base, 0x10000, VME_A24,
|
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) {
|
if (retval) {
|
||||||
dev_err(&card->vdev->dev,
|
dev_err(&card->vdev->dev,
|
||||||
"Unable to configure VME master resource\n");
|
"Unable to configure VME master resource\n");
|
||||||
|
@ -335,7 +335,7 @@ static int pio2_probe(struct vme_dev *vdev)
|
||||||
|
|
||||||
/* Set VME vector */
|
/* Set VME vector */
|
||||||
retval = vme_master_write(card->window, &card->irq_vector, 1,
|
retval = vme_master_write(card->window, &card->irq_vector, 1,
|
||||||
PIO2_REGS_VME_VECTOR);
|
PIO2_REGS_VME_VECTOR);
|
||||||
if (retval < 0)
|
if (retval < 0)
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
|
@ -343,7 +343,7 @@ static int pio2_probe(struct vme_dev *vdev)
|
||||||
vec = card->irq_vector | PIO2_VME_VECTOR_SPUR;
|
vec = card->irq_vector | PIO2_VME_VECTOR_SPUR;
|
||||||
|
|
||||||
retval = vme_irq_request(vdev, card->irq_level, vec,
|
retval = vme_irq_request(vdev, card->irq_level, vec,
|
||||||
&pio2_int, (void *)card);
|
&pio2_int, (void *)card);
|
||||||
if (retval < 0) {
|
if (retval < 0) {
|
||||||
dev_err(&card->vdev->dev,
|
dev_err(&card->vdev->dev,
|
||||||
"Unable to attach VME interrupt vector0x%x, level 0x%x\n",
|
"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];
|
vec = card->irq_vector | PIO2_VECTOR_BANK[i];
|
||||||
|
|
||||||
retval = vme_irq_request(vdev, card->irq_level, vec,
|
retval = vme_irq_request(vdev, card->irq_level, vec,
|
||||||
&pio2_int, (void *)card);
|
&pio2_int, (void *)card);
|
||||||
if (retval < 0) {
|
if (retval < 0) {
|
||||||
dev_err(&card->vdev->dev,
|
dev_err(&card->vdev->dev,
|
||||||
"Unable to attach VME interrupt vector0x%x, level 0x%x\n",
|
"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_set_drvdata(&card->vdev->dev, card);
|
||||||
|
|
||||||
dev_info(&card->vdev->dev,
|
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);
|
card->base);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -37,14 +37,14 @@ static int pio2_gpio_get(struct gpio_chip *chip, unsigned int offset)
|
||||||
struct pio2_card *card = gpio_to_pio2_card(chip);
|
struct pio2_card *card = gpio_to_pio2_card(chip);
|
||||||
|
|
||||||
if ((card->bank[PIO2_CHANNEL_BANK[offset]].config == OUTPUT) |
|
if ((card->bank[PIO2_CHANNEL_BANK[offset]].config == OUTPUT) |
|
||||||
(card->bank[PIO2_CHANNEL_BANK[offset]].config == NOFIT)) {
|
(card->bank[PIO2_CHANNEL_BANK[offset]].config == NOFIT)) {
|
||||||
|
|
||||||
dev_err(&card->vdev->dev, "Channel not available as input\n");
|
dev_err(&card->vdev->dev, "Channel not available as input\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
retval = vme_master_read(card->window, ®, 1,
|
retval = vme_master_read(card->window, ®, 1,
|
||||||
PIO2_REGS_DATA[PIO2_CHANNEL_BANK[offset]]);
|
PIO2_REGS_DATA[PIO2_CHANNEL_BANK[offset]]);
|
||||||
if (retval < 0) {
|
if (retval < 0) {
|
||||||
dev_err(&card->vdev->dev, "Unable to read from GPIO\n");
|
dev_err(&card->vdev->dev, "Unable to read from GPIO\n");
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -67,15 +67,15 @@ static int pio2_gpio_get(struct gpio_chip *chip, unsigned int offset)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pio2_gpio_set(struct gpio_chip *chip, unsigned int offset,
|
static void pio2_gpio_set(struct gpio_chip *chip,
|
||||||
int value)
|
unsigned int offset, int value)
|
||||||
{
|
{
|
||||||
u8 reg;
|
u8 reg;
|
||||||
int retval;
|
int retval;
|
||||||
struct pio2_card *card = gpio_to_pio2_card(chip);
|
struct pio2_card *card = gpio_to_pio2_card(chip);
|
||||||
|
|
||||||
if ((card->bank[PIO2_CHANNEL_BANK[offset]].config == INPUT) |
|
if ((card->bank[PIO2_CHANNEL_BANK[offset]].config == INPUT) |
|
||||||
(card->bank[PIO2_CHANNEL_BANK[offset]].config == NOFIT)) {
|
(card->bank[PIO2_CHANNEL_BANK[offset]].config == NOFIT)) {
|
||||||
|
|
||||||
dev_err(&card->vdev->dev, "Channel not available as output\n");
|
dev_err(&card->vdev->dev, "Channel not available as output\n");
|
||||||
return;
|
return;
|
||||||
|
@ -89,7 +89,7 @@ static void pio2_gpio_set(struct gpio_chip *chip, unsigned int offset,
|
||||||
~PIO2_CHANNEL_BIT[offset];
|
~PIO2_CHANNEL_BIT[offset];
|
||||||
|
|
||||||
retval = vme_master_write(card->window, ®, 1,
|
retval = vme_master_write(card->window, ®, 1,
|
||||||
PIO2_REGS_DATA[PIO2_CHANNEL_BANK[offset]]);
|
PIO2_REGS_DATA[PIO2_CHANNEL_BANK[offset]]);
|
||||||
if (retval < 0) {
|
if (retval < 0) {
|
||||||
dev_err(&card->vdev->dev, "Unable to write to GPIO\n");
|
dev_err(&card->vdev->dev, "Unable to write to GPIO\n");
|
||||||
return;
|
return;
|
||||||
|
@ -105,7 +105,7 @@ static int pio2_gpio_dir_in(struct gpio_chip *chip, unsigned offset)
|
||||||
struct pio2_card *card = gpio_to_pio2_card(chip);
|
struct pio2_card *card = gpio_to_pio2_card(chip);
|
||||||
|
|
||||||
if ((card->bank[PIO2_CHANNEL_BANK[offset]].config == OUTPUT) |
|
if ((card->bank[PIO2_CHANNEL_BANK[offset]].config == OUTPUT) |
|
||||||
(card->bank[PIO2_CHANNEL_BANK[offset]].config == NOFIT)) {
|
(card->bank[PIO2_CHANNEL_BANK[offset]].config == NOFIT)) {
|
||||||
dev_err(&card->vdev->dev,
|
dev_err(&card->vdev->dev,
|
||||||
"Channel directionality not configurable at runtime\n");
|
"Channel directionality not configurable at runtime\n");
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ static int pio2_gpio_dir_out(struct gpio_chip *chip, unsigned offset, int value)
|
||||||
struct pio2_card *card = gpio_to_pio2_card(chip);
|
struct pio2_card *card = gpio_to_pio2_card(chip);
|
||||||
|
|
||||||
if ((card->bank[PIO2_CHANNEL_BANK[offset]].config == INPUT) |
|
if ((card->bank[PIO2_CHANNEL_BANK[offset]].config == INPUT) |
|
||||||
(card->bank[PIO2_CHANNEL_BANK[offset]].config == NOFIT)) {
|
(card->bank[PIO2_CHANNEL_BANK[offset]].config == NOFIT)) {
|
||||||
dev_err(&card->vdev->dev,
|
dev_err(&card->vdev->dev,
|
||||||
"Channel directionality not configurable at runtime\n");
|
"Channel directionality not configurable at runtime\n");
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ int pio2_gpio_reset(struct pio2_card *card)
|
||||||
/* Zero output registers */
|
/* Zero output registers */
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
retval = vme_master_write(card->window, &data, 1,
|
retval = vme_master_write(card->window, &data, 1,
|
||||||
PIO2_REGS_DATA[i]);
|
PIO2_REGS_DATA[i]);
|
||||||
if (retval < 0)
|
if (retval < 0)
|
||||||
return retval;
|
return retval;
|
||||||
card->bank[i].value = 0;
|
card->bank[i].value = 0;
|
||||||
|
@ -159,12 +159,12 @@ int pio2_gpio_reset(struct pio2_card *card)
|
||||||
/* Set input interrupt masks */
|
/* Set input interrupt masks */
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
retval = vme_master_write(card->window, &data, 1,
|
retval = vme_master_write(card->window, &data, 1,
|
||||||
PIO2_REGS_INT_MASK[i * 2]);
|
PIO2_REGS_INT_MASK[i * 2]);
|
||||||
if (retval < 0)
|
if (retval < 0)
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
retval = vme_master_write(card->window, &data, 1,
|
retval = vme_master_write(card->window, &data, 1,
|
||||||
PIO2_REGS_INT_MASK[(i * 2) + 1]);
|
PIO2_REGS_INT_MASK[(i * 2) + 1]);
|
||||||
if (retval < 0)
|
if (retval < 0)
|
||||||
return retval;
|
return retval;
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ int pio2_gpio_reset(struct pio2_card *card)
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
do {
|
do {
|
||||||
retval = vme_master_read(card->window, &data, 1,
|
retval = vme_master_read(card->window, &data, 1,
|
||||||
PIO2_REGS_INT_STAT[i]);
|
PIO2_REGS_INT_STAT[i]);
|
||||||
if (retval < 0)
|
if (retval < 0)
|
||||||
return retval;
|
return retval;
|
||||||
} while (data != 0);
|
} while (data != 0);
|
||||||
|
|
Loading…
Reference in a new issue