diff options
| author | Ian Abbott <abbotti@mev.co.uk> | 2013-01-08 13:27:48 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-17 16:49:25 -0800 |
| commit | ba1bcf6f23e192e88b7c07d20d6221a0bcb7929e (patch) | |
| tree | 21a48a02d281a96c93ceadcff895dc620701c10a /tools/perf/scripts/python/syscall-counts.py | |
| parent | a679f36152dab84e9187572b2a3e193ddd95f58d (diff) | |
staging: comedi: (core): add comedi_dev_from_file_info()
Setting `info = comedi_file_info_from_minor(minor)` and `dev =
comedi_dev_from_minor(minor)` in the same function is a bit of a waste.
The latter function is just a call of the former followed by a
conditional return of an embedded pointer (`info->device`) or NULL. The
former function uses a spin-lock which is where the wastfulness comes
in.
Move the "followed by a conditional return of an embedded pointer" part
into a new function `comedi_dev_from_file_info` and call this instead of
`comedi_dev_from_minor()` in the places where
`comedi_file_info_from_minor()` is also called.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions
