Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39663
b: refs/heads/master
c: 1447190
h: refs/heads/master
i:
  39661: 616071a
  39659: 58dea5b
  39655: cd9e8d7
  39647: 0850d3d
v: v3
  • Loading branch information
Dmitry Torokhov committed Nov 3, 2006
1 parent a394004 commit 8963f96
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b435fdcda126db42343b8055d04a0a27c229717b
refs/heads/master: 1447190e39847cc2cc8a826e7061989c83ff4362
25 changes: 24 additions & 1 deletion trunk/drivers/input/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static struct input_handler *input_table[8];

/**
* input_event() - report new input event
* @handle: device that generated the event
* @dev: device that generated the event
* @type: type of the event
* @code: event code
* @value: value of the event
Expand Down Expand Up @@ -900,6 +900,15 @@ struct class input_class = {
};
EXPORT_SYMBOL_GPL(input_class);

/**
* input_allocate_device - allocate memory for new input device
*
* Returns prepared struct input_dev or NULL.
*
* NOTE: Use input_free_device() to free devices that have not been
* registered; input_unregister_device() should be used for already
* registered devices.
*/
struct input_dev *input_allocate_device(void)
{
struct input_dev *dev;
Expand All @@ -919,6 +928,20 @@ struct input_dev *input_allocate_device(void)
}
EXPORT_SYMBOL(input_allocate_device);

/**
* input_free_device - free memory occupied by input_dev structure
* @dev: input device to free
*
* This function should only be used if input_register_device()
* was not called yet or if it failed. Once device was registered
* use input_unregister_device() and memory will be freed once last
* refrence to the device is dropped.
*
* Device should be allocated by input_allocate_device().
*
* NOTE: If there are references to the input device then memory
* will not be freed until last reference is dropped.
*/
void input_free_device(struct input_dev *dev)
{
if (dev) {
Expand Down

0 comments on commit 8963f96

Please sign in to comment.