projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ar71xx: clean up image fs selection templates
[openwrt.git]
/
target
/
linux
/
generic-2.6
/
files
/
drivers
/
input
/
misc
/
gpio_buttons.c
diff --git
a/target/linux/generic-2.6/files/drivers/input/misc/gpio_buttons.c
b/target/linux/generic-2.6/files/drivers/input/misc/gpio_buttons.c
index
0d219ff
..
83a8178
100644
(file)
--- a/
target/linux/generic-2.6/files/drivers/input/misc/gpio_buttons.c
+++ b/
target/linux/generic-2.6/files/drivers/input/misc/gpio_buttons.c
@@
-15,10
+15,13
@@
*
*/
*
*/
+#include <linux/kernel.h>
+#include <linux/module.h>
#include <linux/init.h>
#include <linux/init.h>
+
+#include <linux/input.h>
#include <linux/input-polldev.h>
#include <linux/ioport.h>
#include <linux/input-polldev.h>
#include <linux/ioport.h>
-#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/gpio_buttons.h>
#include <linux/platform_device.h>
#include <linux/gpio_buttons.h>
@@
-26,7
+29,7
@@
#include <asm/gpio.h>
#define DRV_NAME "gpio-buttons"
#include <asm/gpio.h>
#define DRV_NAME "gpio-buttons"
-#define DRV_VERSION "0.1.
0
"
+#define DRV_VERSION "0.1.
1
"
#define PFX DRV_NAME ": "
struct gpio_buttons_dev {
#define PFX DRV_NAME ": "
struct gpio_buttons_dev {
@@
-80,13
+83,13
@@
static int __devinit gpio_buttons_probe(struct platform_device *pdev)
bdev = kzalloc(sizeof(*bdev), GFP_KERNEL);
if (!bdev) {
bdev = kzalloc(sizeof(*bdev), GFP_KERNEL);
if (!bdev) {
- pr
_err(
DRV_NAME "no memory for device\n");
+ pr
intk(KERN_ERR
DRV_NAME "no memory for device\n");
return -ENOMEM;
}
poll_dev = input_allocate_polled_device();
if (!poll_dev) {
return -ENOMEM;
}
poll_dev = input_allocate_polled_device();
if (!poll_dev) {
- pr
_err(
DRV_NAME "no memory for polled device\n");
+ pr
intk(KERN_ERR
DRV_NAME "no memory for polled device\n");
error = -ENOMEM;
goto err_free_bdev;
}
error = -ENOMEM;
goto err_free_bdev;
}
@@
-97,7
+100,7
@@
static int __devinit gpio_buttons_probe(struct platform_device *pdev)
input = poll_dev->input;
input = poll_dev->input;
- input->evbit[0] = BIT
_MASK
(EV_KEY);
+ input->evbit[0] = BIT(EV_KEY);
input->name = pdev->name;
input->phys = "gpio-buttons/input0";
input->dev.parent = &pdev->dev;
input->name = pdev->name;
input->phys = "gpio-buttons/input0";
input->dev.parent = &pdev->dev;
@@
-115,15
+118,15
@@
static int __devinit gpio_buttons_probe(struct platform_device *pdev)
error = gpio_request(gpio, button->desc ?
button->desc : DRV_NAME);
if (error) {
error = gpio_request(gpio, button->desc ?
button->desc : DRV_NAME);
if (error) {
- pr
_err(PFX "unable to claim gpio %u, error %d\n",
- gpio, error);
+ pr
intk(KERN_ERR PFX "unable to claim gpio %u, "
+
"error %d\n",
gpio, error);
goto err_free_gpio;
}
error = gpio_direction_input(gpio);
if (error) {
goto err_free_gpio;
}
error = gpio_direction_input(gpio);
if (error) {
- pr
_err(PFX "unable to set direction on gpio %u,
"
- "error %d\n", gpio, error);
+ pr
intk(KERN_ERR PFX "unable to set direction on
"
+ "
gpio %u,
error %d\n", gpio, error);
goto err_free_gpio;
}
goto err_free_gpio;
}
@@
-137,8
+140,8
@@
static int __devinit gpio_buttons_probe(struct platform_device *pdev)
error = input_register_polled_device(poll_dev);
if (error) {
error = input_register_polled_device(poll_dev);
if (error) {
- pr
_err(PFX "unable to register polled device, error %d\n",
-
error);
+ pr
intk(KERN_ERR PFX "unable to register polled device, "
+
"error %d\n",
error);
goto err_free_gpio;
}
goto err_free_gpio;
}
@@
-152,7
+155,7
@@
err_free_gpio:
err_free_bdev:
kfree(bdev);
err_free_bdev:
kfree(bdev);
-err:
+
platform_set_drvdata(pdev, NULL);
return error;
}
platform_set_drvdata(pdev, NULL);
return error;
}
@@
-187,7
+190,7
@@
static struct platform_driver gpio_buttons_driver = {
static int __init gpio_buttons_init(void)
{
static int __init gpio_buttons_init(void)
{
- pr
_info(
DRV_NAME " driver version " DRV_VERSION "\n");
+ pr
intk(KERN_INFO
DRV_NAME " driver version " DRV_VERSION "\n");
return platform_driver_register(&gpio_buttons_driver);
}
return platform_driver_register(&gpio_buttons_driver);
}
This page took
0.026371 seconds
and
4
git commands to generate.