Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / input / evbug.c
index c31f5ab..07358fb 100644 (file)
 /*
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or 
+ * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- * 
+ *
  * Should you need to contact me, the author, you can do so either by
  * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
  * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
@@ -35,7 +35,7 @@
 #include <linux/device.h>
 
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
-MODULE_DESCRIPTION("Input driver event debug module"); 
+MODULE_DESCRIPTION("Input driver event debug module");
 MODULE_LICENSE("GPL");
 
 static char evbug_name[] = "evbug";
@@ -49,9 +49,8 @@ static struct input_handle *evbug_connect(struct input_handler *handler, struct
 {
        struct input_handle *handle;
 
-       if (!(handle = kmalloc(sizeof(struct input_handle), GFP_KERNEL)))
+       if (!(handle = kzalloc(sizeof(struct input_handle), GFP_KERNEL)))
                return NULL;
-       memset(handle, 0, sizeof(struct input_handle));
 
        handle->dev = dev;
        handle->handler = handler;
@@ -67,7 +66,7 @@ static struct input_handle *evbug_connect(struct input_handler *handler, struct
 static void evbug_disconnect(struct input_handle *handle)
 {
        printk(KERN_DEBUG "evbug.c: Disconnected device: %s\n", handle->dev->phys);
-       
+
        input_close_device(handle);
 
        kfree(handle);
@@ -79,7 +78,7 @@ static struct input_device_id evbug_ids[] = {
 };
 
 MODULE_DEVICE_TABLE(input, evbug_ids);
-       
+
 static struct input_handler evbug_handler = {
        .event =        evbug_event,
        .connect =      evbug_connect,
@@ -88,13 +87,13 @@ static struct input_handler evbug_handler = {
        .id_table =     evbug_ids,
 };
 
-int __init evbug_init(void)
+static int __init evbug_init(void)
 {
        input_register_handler(&evbug_handler);
        return 0;
 }
 
-void __exit evbug_exit(void)
+static void __exit evbug_exit(void)
 {
        input_unregister_handler(&evbug_handler);
 }