Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 161261
b: refs/heads/master
c: 11a7926
h: refs/heads/master
i:
  161259: 9418b1c
v: v3
  • Loading branch information
Mike Frysinger authored and Dmitry Torokhov committed Jul 23, 2009
1 parent f0e593d commit 42cffe5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4832958218f96f98009c5e01729fbe2b48c7124c
refs/heads/master: 11a79260916b00bcfe1bcfbd7a994321ee25b880
26 changes: 9 additions & 17 deletions trunk/drivers/input/keyboard/bf54x-keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,13 @@ static int __devinit bfin_kpad_probe(struct platform_device *pdev)
int i, error;

if (!pdata->rows || !pdata->cols || !pdata->keymap) {
printk(KERN_ERR DRV_NAME
": No rows, cols or keymap from pdata\n");
dev_err(&pdev->dev, "no rows, cols or keymap from pdata\n");
return -EINVAL;
}

if (!pdata->keymapsize ||
pdata->keymapsize > (pdata->rows * pdata->cols)) {
printk(KERN_ERR DRV_NAME ": Invalid keymapsize\n");
dev_err(&pdev->dev, "invalid keymapsize\n");
return -EINVAL;
}

Expand All @@ -211,8 +210,8 @@ static int __devinit bfin_kpad_probe(struct platform_device *pdev)

if (!pdata->debounce_time || pdata->debounce_time > MAX_MULT ||
!pdata->coldrive_time || pdata->coldrive_time > MAX_MULT) {
printk(KERN_WARNING DRV_NAME
": Invalid Debounce/Columndrive Time in platform data\n");
dev_warn(&pdev->dev,
"invalid platform debounce/columndrive time\n");
bfin_write_KPAD_MSEL(0xFF0); /* Default MSEL */
} else {
bfin_write_KPAD_MSEL(
Expand All @@ -231,16 +230,14 @@ static int __devinit bfin_kpad_probe(struct platform_device *pdev)

if (peripheral_request_list((u16 *)&per_rows[MAX_RC - pdata->rows],
DRV_NAME)) {
printk(KERN_ERR DRV_NAME
": Requesting Peripherals failed\n");
dev_err(&pdev->dev, "requesting peripherals failed\n");
error = -EFAULT;
goto out0;
}

if (peripheral_request_list((u16 *)&per_cols[MAX_RC - pdata->cols],
DRV_NAME)) {
printk(KERN_ERR DRV_NAME
": Requesting Peripherals failed\n");
dev_err(&pdev->dev, "requesting peripherals failed\n");
error = -EFAULT;
goto out1;
}
Expand All @@ -254,9 +251,8 @@ static int __devinit bfin_kpad_probe(struct platform_device *pdev)
error = request_irq(bf54x_kpad->irq, bfin_kpad_isr,
0, DRV_NAME, pdev);
if (error) {
printk(KERN_ERR DRV_NAME
": unable to claim irq %d; error %d\n",
bf54x_kpad->irq, error);
dev_err(&pdev->dev, "unable to claim irq %d\n",
bf54x_kpad->irq);
goto out2;
}

Expand Down Expand Up @@ -297,8 +293,7 @@ static int __devinit bfin_kpad_probe(struct platform_device *pdev)

error = input_register_device(input);
if (error) {
printk(KERN_ERR DRV_NAME
": Unable to register input device (%d)\n", error);
dev_err(&pdev->dev, "unable to register input device\n");
goto out4;
}

Expand All @@ -316,9 +311,6 @@ static int __devinit bfin_kpad_probe(struct platform_device *pdev)

device_init_wakeup(&pdev->dev, 1);

printk(KERN_ERR DRV_NAME
": Blackfin BF54x Keypad registered IRQ %d\n", bf54x_kpad->irq);

return 0;

out4:
Expand Down

0 comments on commit 42cffe5

Please sign in to comment.