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
f3cf2673
Commit
f3cf2673
authored
Jan 13, 2007
by
Kyle McMartin
Committed by
Kyle McMartin
Feb 17, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PARISC] generate modalias for parisc_device_id tables
Signed-off-by:
Kyle McMartin
<
kyle@parisc-linux.org
>
parent
f2439b26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
scripts/mod/file2alias.c
scripts/mod/file2alias.c
+22
-0
No files found.
scripts/mod/file2alias.c
View file @
f3cf2673
...
@@ -452,6 +452,24 @@ static int do_eisa_entry(const char *filename, struct eisa_device_id *eisa,
...
@@ -452,6 +452,24 @@ static int do_eisa_entry(const char *filename, struct eisa_device_id *eisa,
return
1
;
return
1
;
}
}
/* Looks like: parisc:tNhvNrevNsvN */
static
int
do_parisc_entry
(
const
char
*
filename
,
struct
parisc_device_id
*
id
,
char
*
alias
)
{
id
->
hw_type
=
TO_NATIVE
(
id
->
hw_type
);
id
->
hversion
=
TO_NATIVE
(
id
->
hversion
);
id
->
hversion_rev
=
TO_NATIVE
(
id
->
hversion_rev
);
id
->
sversion
=
TO_NATIVE
(
id
->
sversion
);
strcpy
(
alias
,
"parisc:"
);
ADD
(
alias
,
"t"
,
id
->
hw_type
!=
HWTYPE_ANY_ID
,
id
->
hw_type
);
ADD
(
alias
,
"hv"
,
id
->
hversion
!=
HVERSION_ANY_ID
,
id
->
hversion
);
ADD
(
alias
,
"rev"
,
id
->
hversion_rev
!=
HVERSION_REV_ANY_ID
,
id
->
hversion_rev
);
ADD
(
alias
,
"sv"
,
id
->
sversion
!=
SVERSION_ANY_ID
,
id
->
sversion
);
return
1
;
}
/* Ignore any prefix, eg. v850 prepends _ */
/* Ignore any prefix, eg. v850 prepends _ */
static
inline
int
sym_is
(
const
char
*
symbol
,
const
char
*
name
)
static
inline
int
sym_is
(
const
char
*
symbol
,
const
char
*
name
)
{
{
...
@@ -559,6 +577,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
...
@@ -559,6 +577,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
do_table
(
symval
,
sym
->
st_size
,
do_table
(
symval
,
sym
->
st_size
,
sizeof
(
struct
eisa_device_id
),
"eisa"
,
sizeof
(
struct
eisa_device_id
),
"eisa"
,
do_eisa_entry
,
mod
);
do_eisa_entry
,
mod
);
else
if
(
sym_is
(
symname
,
"__mod_parisc_device_table"
))
do_table
(
symval
,
sym
->
st_size
,
sizeof
(
struct
parisc_device_id
),
"parisc"
,
do_parisc_entry
,
mod
);
}
}
/* Now add out buffered information to the generated C source */
/* Now add out buffered information to the generated C source */
...
...
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