Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zio
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
misc
zio
Commits
1e8ee129
Commit
1e8ee129
authored
12 years ago
by
Federico Vaga
Browse files
Options
Downloads
Patches
Plain Diff
[style] object.c: improve readability of zio_unregister_device()
Signed-off-by:
Federico Vaga
<
federico.vaga@gmail.com
>
parent
ddfe1ed5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
objects.c
+8
-4
8 additions, 4 deletions
objects.c
with
8 additions
and
4 deletions
objects.c
+
8
−
4
View file @
1e8ee129
...
...
@@ -1110,18 +1110,22 @@ static int __zdev_match_child(struct device *dev, void *data)
}
void
zio_unregister_device
(
struct
zio_device
*
zdev
)
{
struct
device
*
parent
=
&
zdev
->
head
.
dev
;
struct
device
*
dev
;
/*
* the child of a generic zio_device could be only a real zio_device.
* If it exists, unregister it
*/
dev
=
device_find_child
(
&
zdev
->
head
.
dev
,
NULL
,
__zdev_match_child
);
if
(
dev
)
dev
=
device_find_child
(
parent
,
NULL
,
__zdev_match_child
);
if
(
dev
)
{
__zdev_unregister
(
to_zio_dev
(
dev
));
}
else
{
dev_warn
(
parent
,
" Cannot find device any child
\n
"
);
}
pr
_info
(
"ZIO:
device
%s
removed
\n
"
,
dev_name
(
&
zdev
->
head
.
dev
)
);
device_unregister
(
&
zdev
->
head
.
dev
);
dev
_info
(
parent
,
"
device removed
\n
"
);
device_unregister
(
parent
);
}
EXPORT_SYMBOL
(
zio_unregister_device
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment