Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Z
ZIO
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
ZIO
Commits
a094d6c4
Commit
a094d6c4
authored
Jul 03, 2012
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TEMP change dev_set_name to a define
Signed-off-by:
Federico Vaga
<
federico.vaga@gmail.com
>
parent
9c3d7f9e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
zio-compat-24.h
include/linux/zio-compat-24.h
+6
-10
No files found.
include/linux/zio-compat-24.h
View file @
a094d6c4
...
...
@@ -22,16 +22,12 @@ static inline const char *dev_name(struct device *dev)
return
kobject_name
(
&
dev
->
kobj
);
}
static
int
dev_set_name
(
struct
device
*
dev
,
const
char
*
fmt
,
...)
{
int
err
=
0
;
va_list
vargs
;
va_start
(
vargs
,
fmt
);
err
=
kobject_set_name
(
&
dev
->
kobj
,
fmt
,
vargs
);
va_end
(
vargs
);
return
err
;
}
#define dev_set_name(dev, fmt, ...) ({ \
int err = 0; \
err = kobject_set_name(&(dev)->kobj, fmt, ## __VA_ARGS__); \
if (!err) \
strncpy((dev)->bus_id, (dev)->kobj.k_name, BUS_ID_SIZE); \
err; })
#endif
/* strict_strtol() appared in v2.6. */
...
...
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