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
nexedi
linux
Commits
95548e47
Commit
95548e47
authored
May 29, 2002
by
Patrick Mochel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
device model: remove flags parameter from struct device_driver::remove and fix all users
parent
64d1cb77
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
10 deletions
+5
-10
drivers/base/core.c
drivers/base/core.c
+2
-2
drivers/base/power.c
drivers/base/power.c
+1
-1
drivers/pci/pci-driver.c
drivers/pci/pci-driver.c
+1
-1
include/linux/device.h
include/linux/device.h
+1
-6
No files found.
drivers/base/core.c
View file @
95548e47
...
@@ -98,7 +98,7 @@ static void device_unbind(struct device * dev)
...
@@ -98,7 +98,7 @@ static void device_unbind(struct device * dev)
{
{
/* unbind from driver */
/* unbind from driver */
if
(
dev
->
driver
&&
dev
->
driver
->
remove
)
if
(
dev
->
driver
&&
dev
->
driver
->
remove
)
dev
->
driver
->
remove
(
dev
,
REMOVE_NOTIFY
);
dev
->
driver
->
remove
(
dev
);
}
}
static
int
do_driver_bind
(
struct
device
*
dev
,
void
*
data
)
static
int
do_driver_bind
(
struct
device
*
dev
,
void
*
data
)
...
@@ -126,7 +126,7 @@ static int do_driver_unbind(struct device * dev, void * data)
...
@@ -126,7 +126,7 @@ static int do_driver_unbind(struct device * dev, void * data)
dev
->
driver
=
NULL
;
dev
->
driver
=
NULL
;
unlock_device
(
dev
);
unlock_device
(
dev
);
if
(
drv
->
remove
)
if
(
drv
->
remove
)
drv
->
remove
(
dev
,
REMOVE_NOTIFY
);
drv
->
remove
(
dev
);
}
else
}
else
unlock_device
(
dev
);
unlock_device
(
dev
);
return
0
;
return
0
;
...
...
drivers/base/power.c
View file @
95548e47
...
@@ -113,7 +113,7 @@ void device_shutdown(void)
...
@@ -113,7 +113,7 @@ void device_shutdown(void)
put_device
(
prev
);
put_device
(
prev
);
if
(
dev
->
driver
&&
dev
->
driver
->
remove
)
if
(
dev
->
driver
&&
dev
->
driver
->
remove
)
dev
->
driver
->
remove
(
dev
,
REMOVE_FREE_RESOURCES
);
dev
->
driver
->
remove
(
dev
);
spin_lock
(
&
device_lock
);
spin_lock
(
&
device_lock
);
prev
=
dev
;
prev
=
dev
;
...
...
drivers/pci/pci-driver.c
View file @
95548e47
...
@@ -47,7 +47,7 @@ static int pci_device_probe(struct device * dev)
...
@@ -47,7 +47,7 @@ static int pci_device_probe(struct device * dev)
return
error
>
0
?
0
:
-
ENODEV
;
return
error
>
0
?
0
:
-
ENODEV
;
}
}
static
int
pci_device_remove
(
struct
device
*
dev
,
u32
flags
)
static
int
pci_device_remove
(
struct
device
*
dev
)
{
{
struct
pci_dev
*
pci_dev
=
list_entry
(
dev
,
struct
pci_dev
,
dev
);
struct
pci_dev
*
pci_dev
=
list_entry
(
dev
,
struct
pci_dev
,
dev
);
...
...
include/linux/device.h
View file @
95548e47
...
@@ -48,11 +48,6 @@ enum {
...
@@ -48,11 +48,6 @@ enum {
RESUME_ENABLE
,
RESUME_ENABLE
,
};
};
enum
{
REMOVE_NOTIFY
,
REMOVE_FREE_RESOURCES
,
};
struct
device
;
struct
device
;
struct
device_driver
;
struct
device_driver
;
...
@@ -103,7 +98,7 @@ struct device_driver {
...
@@ -103,7 +98,7 @@ struct device_driver {
struct
driver_dir_entry
dir
;
struct
driver_dir_entry
dir
;
int
(
*
probe
)
(
struct
device
*
dev
);
int
(
*
probe
)
(
struct
device
*
dev
);
int
(
*
remove
)
(
struct
device
*
dev
,
u32
flags
);
int
(
*
remove
)
(
struct
device
*
dev
);
int
(
*
suspend
)
(
struct
device
*
dev
,
u32
state
,
u32
level
);
int
(
*
suspend
)
(
struct
device
*
dev
,
u32
state
,
u32
level
);
int
(
*
resume
)
(
struct
device
*
dev
,
u32
level
);
int
(
*
resume
)
(
struct
device
*
dev
,
u32
level
);
...
...
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