Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
3984cbc9
Commit
3984cbc9
authored
Jul 19, 2004
by
Dmitry Torokhov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Input: serio - switch to use driver_find, adjust reference count
Signed-off-by:
Dmitry Torokhov
<
dtor@mail.ru
>
parent
7f821556
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
drivers/input/serio/serio.c
drivers/input/serio/serio.c
+2
-3
No files found.
drivers/input/serio/serio.c
View file @
3984cbc9
...
@@ -255,7 +255,6 @@ static ssize_t serio_rebind_driver(struct device *dev, const char *buf, size_t c
...
@@ -255,7 +255,6 @@ static ssize_t serio_rebind_driver(struct device *dev, const char *buf, size_t c
{
{
struct
serio
*
serio
=
to_serio_port
(
dev
);
struct
serio
*
serio
=
to_serio_port
(
dev
);
struct
device_driver
*
drv
;
struct
device_driver
*
drv
;
struct
kobject
*
k
;
int
retval
;
int
retval
;
retval
=
down_interruptible
(
&
serio_sem
);
retval
=
down_interruptible
(
&
serio_sem
);
...
@@ -270,10 +269,10 @@ static ssize_t serio_rebind_driver(struct device *dev, const char *buf, size_t c
...
@@ -270,10 +269,10 @@ static ssize_t serio_rebind_driver(struct device *dev, const char *buf, size_t c
}
else
if
(
!
strncmp
(
buf
,
"rescan"
,
count
))
{
}
else
if
(
!
strncmp
(
buf
,
"rescan"
,
count
))
{
serio_disconnect_port
(
serio
);
serio_disconnect_port
(
serio
);
serio_connect_port
(
serio
,
NULL
);
serio_connect_port
(
serio
,
NULL
);
}
else
if
((
k
=
kset_find_obj
(
&
serio_bus
.
drivers
,
buf
))
!=
NULL
)
{
}
else
if
((
drv
=
driver_find
(
buf
,
&
serio_bus
))
!=
NULL
)
{
drv
=
container_of
(
k
,
struct
device_driver
,
kobj
);
serio_disconnect_port
(
serio
);
serio_disconnect_port
(
serio
);
serio_connect_port
(
serio
,
to_serio_driver
(
drv
));
serio_connect_port
(
serio
,
to_serio_driver
(
drv
));
put_driver
(
drv
);
}
else
{
}
else
{
retval
=
-
EINVAL
;
retval
=
-
EINVAL
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment