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
48ff4dac
Commit
48ff4dac
authored
May 03, 2003
by
Ben Collins
Committed by
Linus Torvalds
May 03, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] add ieee1394 module dev table
This adds ieee1394 for module table registration.
parent
4c3c3a21
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
0 deletions
+42
-0
include/linux/mod_devicetable.h
include/linux/mod_devicetable.h
+16
-0
scripts/file2alias.c
scripts/file2alias.c
+26
-0
No files found.
include/linux/mod_devicetable.h
View file @
48ff4dac
...
...
@@ -21,6 +21,22 @@ struct pci_device_id {
kernel_ulong_t
driver_data
;
/* Data private to the driver */
};
#define IEEE1394_MATCH_VENDOR_ID 0x0001
#define IEEE1394_MATCH_MODEL_ID 0x0002
#define IEEE1394_MATCH_SPECIFIER_ID 0x0004
#define IEEE1394_MATCH_VERSION 0x0008
struct
ieee1394_device_id
{
__u32
match_flags
;
__u32
vendor_id
;
__u32
model_id
;
__u32
specifier_id
;
__u32
version
;
kernel_ulong_t
driver_data
;
};
/*
* Device table entry for "new style" table-driven USB drivers.
* User mode code can read these tables to choose which modules to load.
...
...
scripts/file2alias.c
View file @
48ff4dac
...
...
@@ -81,6 +81,29 @@ static int do_usb_entry(const char *filename,
return
1
;
}
/* Looks like: ieee1394:venNmoNspNverN */
static
int
do_ieee1394_entry
(
const
char
*
filename
,
struct
ieee1394_device_id
*
id
,
char
*
alias
)
{
id
->
match_flags
=
TO_NATIVE
(
id
->
match_flags
);
id
->
vendor_id
=
TO_NATIVE
(
id
->
vendor_id
);
id
->
model_id
=
TO_NATIVE
(
id
->
model_id
);
id
->
specifier_id
=
TO_NATIVE
(
id
->
specifier_id
);
id
->
version
=
TO_NATIVE
(
id
->
version
);
strcpy
(
alias
,
"ieee1394:"
);
ADD
(
alias
,
"ven"
,
id
->
match_flags
&
IEEE1394_MATCH_VENDOR_ID
,
id
->
vendor_id
);
ADD
(
alias
,
"mo"
,
id
->
match_flags
&
IEEE1394_MATCH_MODEL_ID
,
id
->
model_id
);
ADD
(
alias
,
"sp"
,
id
->
match_flags
&
IEEE1394_MATCH_SPECIFIER_ID
,
id
->
specifier_id
);
ADD
(
alias
,
"ver"
,
id
->
match_flags
&
IEEE1394_MATCH_VERSION
,
id
->
version
);
return
1
;
}
/* Looks like: pci:vNdNsvNsdNbcNscNiN. */
static
int
do_pci_entry
(
const
char
*
filename
,
struct
pci_device_id
*
id
,
char
*
alias
)
...
...
@@ -184,6 +207,9 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
else
if
(
sym_is
(
symname
,
"__mod_usb_device_table"
))
do_table
(
symval
,
sym
->
st_size
,
sizeof
(
struct
usb_device_id
),
do_usb_entry
,
mod
);
else
if
(
sym_is
(
symname
,
"__mod_ieee1394_device_table"
))
do_table
(
symval
,
sym
->
st_size
,
sizeof
(
struct
ieee1394_device_id
),
do_ieee1394_entry
,
mod
);
}
/* 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