Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174228
b: refs/heads/master
c: db19fd8
h: refs/heads/master
v: v3
  • Loading branch information
Ben Dooks authored and Dmitry Torokhov committed Nov 20, 2009
1 parent 0245ace commit c872867
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 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: fb141597550243b471f3bd526fe689aa3b74df25
refs/heads/master: db19fd8b3a3e198e84b93fa217acf77e72a4cd35
16 changes: 9 additions & 7 deletions trunk/drivers/input/keyboard/gpio_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev)
{
struct gpio_keys_platform_data *pdata = pdev->dev.platform_data;
struct gpio_keys_drvdata *ddata;
struct device *dev = &pdev->dev;
struct input_dev *input;
int i, error;
int wakeup = 0;
Expand All @@ -87,6 +88,7 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev)
GFP_KERNEL);
input = input_allocate_device();
if (!ddata || !input) {
dev_err(dev, "failed to allocate state\n");
error = -ENOMEM;
goto fail1;
}
Expand Down Expand Up @@ -122,14 +124,14 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev)

error = gpio_request(button->gpio, button->desc ?: "gpio_keys");
if (error < 0) {
pr_err("gpio-keys: failed to request GPIO %d,"
" error %d\n", button->gpio, error);
dev_err(dev, "failed to request GPIO %d, error %d\n",
button->gpio, error);
goto fail2;
}

error = gpio_direction_input(button->gpio);
if (error < 0) {
pr_err("gpio-keys: failed to configure input"
dev_err(dev, "failed to configure"
" direction for GPIO %d, error %d\n",
button->gpio, error);
gpio_free(button->gpio);
Expand All @@ -139,8 +141,8 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev)
irq = gpio_to_irq(button->gpio);
if (irq < 0) {
error = irq;
pr_err("gpio-keys: Unable to get irq number"
" for GPIO %d, error %d\n",
dev_err(dev, "Unable to get irq number "
"for GPIO %d, error %d\n",
button->gpio, error);
gpio_free(button->gpio);
goto fail2;
Expand All @@ -152,7 +154,7 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev)
button->desc ? button->desc : "gpio_keys",
bdata);
if (error) {
pr_err("gpio-keys: Unable to claim irq %d; error %d\n",
dev_err(dev, "Unable to claim irq %d; error %d\n",
irq, error);
gpio_free(button->gpio);
goto fail2;
Expand All @@ -166,7 +168,7 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev)

error = input_register_device(input);
if (error) {
pr_err("gpio-keys: Unable to register input device, "
dev_err(dev, "Unable to register input device, "
"error: %d\n", error);
goto fail2;
}
Expand Down

0 comments on commit c872867

Please sign in to comment.