Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Side by Side Diff: drivers/input/joydev.c

Issue 6878004: BACKPORT: Input: mark input interfaces as non-seekable (Closed) Base URL: http://git.chromium.org/git/kernel.git@master
Patch Set: Rebase on 6873042 Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « drivers/input/evdev.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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);
OLDNEW
« no previous file with comments | « drivers/input/evdev.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698