| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Joystick device driver for the input driver suite. | 2 * Joystick device driver for the input driver suite. |
| 3 * | 3 * |
| 4 * Copyright (c) 1999-2002 Vojtech Pavlik | 4 * Copyright (c) 1999-2002 Vojtech Pavlik |
| 5 * Copyright (c) 1999 Colin Van Dyke | 5 * Copyright (c) 1999 Colin Van Dyke |
| 6 * | 6 * |
| 7 * This program is free software; you can redistribute it and/or modify | 7 * This program is free software; you can redistribute it and/or modify |
| 8 * it under the terms of the GNU General Public License as published by | 8 * it under the terms of the GNU General Public License as published by |
| 9 * the Free Software Foundation; either version 2 of the License, or | 9 * the Free Software Foundation; either version 2 of the License, or |
| 10 * (at your option) any later version. | 10 * (at your option) any later version. |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 | 279 |
| 280 spin_lock_init(&client->buffer_lock); | 280 spin_lock_init(&client->buffer_lock); |
| 281 client->joydev = joydev; | 281 client->joydev = joydev; |
| 282 joydev_attach_client(joydev, client); | 282 joydev_attach_client(joydev, client); |
| 283 | 283 |
| 284 error = joydev_open_device(joydev); | 284 error = joydev_open_device(joydev); |
| 285 if (error) | 285 if (error) |
| 286 goto err_free_client; | 286 goto err_free_client; |
| 287 | 287 |
| 288 file->private_data = client; | 288 file->private_data = client; |
| 289 nonseekable_open(inode, file); |
| 290 |
| 289 return 0; | 291 return 0; |
| 290 | 292 |
| 291 err_free_client: | 293 err_free_client: |
| 292 joydev_detach_client(joydev, client); | 294 joydev_detach_client(joydev, client); |
| 293 kfree(client); | 295 kfree(client); |
| 294 err_put_joydev: | 296 err_put_joydev: |
| 295 put_device(&joydev->dev); | 297 put_device(&joydev->dev); |
| 296 return error; | 298 return error; |
| 297 } | 299 } |
| 298 | 300 |
| (...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 953 return input_register_handler(&joydev_handler); | 955 return input_register_handler(&joydev_handler); |
| 954 } | 956 } |
| 955 | 957 |
| 956 static void __exit joydev_exit(void) | 958 static void __exit joydev_exit(void) |
| 957 { | 959 { |
| 958 input_unregister_handler(&joydev_handler); | 960 input_unregister_handler(&joydev_handler); |
| 959 } | 961 } |
| 960 | 962 |
| 961 module_init(joydev_init); | 963 module_init(joydev_init); |
| 962 module_exit(joydev_exit); | 964 module_exit(joydev_exit); |
| OLD | NEW |