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
cdc265a4
Commit
cdc265a4
authored
May 29, 2002
by
Patrick Mochel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
USB: define usb_bus_type and register on startup
parent
22775da0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
drivers/usb/core/usb.c
drivers/usb/core/usb.c
+5
-0
include/linux/usb.h
include/linux/usb.h
+2
-0
No files found.
drivers/usb/core/usb.c
View file @
cdc265a4
...
@@ -2757,12 +2757,16 @@ struct list_head *usb_bus_get_list(void)
...
@@ -2757,12 +2757,16 @@ struct list_head *usb_bus_get_list(void)
}
}
#endif
#endif
struct
bus_type
usb_bus_type
=
{
name:
"usb"
,
};
/*
/*
* Init
* Init
*/
*/
static
int
__init
usb_init
(
void
)
static
int
__init
usb_init
(
void
)
{
{
bus_register
(
&
usb_bus_type
);
usb_major_init
();
usb_major_init
();
usbfs_init
();
usbfs_init
();
usb_hub_init
();
usb_hub_init
();
...
@@ -2775,6 +2779,7 @@ static int __init usb_init(void)
...
@@ -2775,6 +2779,7 @@ static int __init usb_init(void)
*/
*/
static
void
__exit
usb_exit
(
void
)
static
void
__exit
usb_exit
(
void
)
{
{
put_bus
(
&
usb_bus_type
);
usb_major_cleanup
();
usb_major_cleanup
();
usbfs_cleanup
();
usbfs_cleanup
();
usb_hub_cleanup
();
usb_hub_cleanup
();
...
...
include/linux/usb.h
View file @
cdc265a4
...
@@ -713,6 +713,8 @@ struct usb_driver {
...
@@ -713,6 +713,8 @@ struct usb_driver {
/* void (*resume)(struct usb_device *dev); */
/* void (*resume)(struct usb_device *dev); */
};
};
extern
struct
bus_type
usb_bus_type
;
/*
/*
* use these in module_init()/module_exit()
* use these in module_init()/module_exit()
* and don't forget MODULE_DEVICE_TABLE(usb, ...)
* and don't forget MODULE_DEVICE_TABLE(usb, ...)
...
...
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