git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
input
/
power.c
diff --git
a/drivers/input/power.c
b/drivers/input/power.c
index
bfc5c63
..
ee82464
100644
(file)
--- a/
drivers/input/power.c
+++ b/
drivers/input/power.c
@@
-28,7
+28,6
@@
*/
#include <linux/module.h>
*/
#include <linux/module.h>
-#include <linux/config.h>
#include <linux/input.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/slab.h>
#include <linux/init.h>
@@
-99,13
+98,12
@@
static void power_event(struct input_handle *handle, unsigned int type,
static struct input_handle *power_connect(struct input_handler *handler,
struct input_dev *dev,
static struct input_handle *power_connect(struct input_handler *handler,
struct input_dev *dev,
- struct input_device_id *id)
+
const
struct input_device_id *id)
{
struct input_handle *handle;
{
struct input_handle *handle;
- if (!(handle = k
m
alloc(sizeof(struct input_handle), GFP_KERNEL)))
+ if (!(handle = k
z
alloc(sizeof(struct input_handle), GFP_KERNEL)))
return NULL;
return NULL;
- memset(handle, 0, sizeof(struct input_handle));
handle->dev = dev;
handle->handler = handler;
handle->dev = dev;
handle->handler = handler;
@@
-122,7
+120,7
@@
static void power_disconnect(struct input_handle *handle)
kfree(handle);
}
kfree(handle);
}
-static struct input_device_id power_ids[] = {
+static
const
struct input_device_id power_ids[] = {
{
.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBIT,
.evbit = { BIT(EV_KEY) },
{
.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBIT,
.evbit = { BIT(EV_KEY) },
@@
-152,8
+150,7
@@
static struct input_handler power_handler = {
static int __init power_init(void)
{
static int __init power_init(void)
{
- input_register_handler(&power_handler);
- return 0;
+ return input_register_handler(&power_handler);
}
static void __exit power_exit(void)
}
static void __exit power_exit(void)