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
505f6a88
Commit
505f6a88
authored
Aug 19, 2003
by
Patrick Mochel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[power] Update IDE to set suspend/resume methods in bus_type.
Instead of having each driver set them in their own drivers.
parent
222192df
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
22 deletions
+4
-22
drivers/ide/ide-cd.c
drivers/ide/ide-cd.c
+0
-4
drivers/ide/ide-disk.c
drivers/ide/ide-disk.c
+0
-4
drivers/ide/ide.c
drivers/ide/ide.c
+4
-12
include/linux/ide.h
include/linux/ide.h
+0
-2
No files found.
drivers/ide/ide-cd.c
View file @
505f6a88
...
@@ -3330,10 +3330,6 @@ static ide_driver_t ide_cdrom_driver = {
...
@@ -3330,10 +3330,6 @@ static ide_driver_t ide_cdrom_driver = {
.
drives
=
LIST_HEAD_INIT
(
ide_cdrom_driver
.
drives
),
.
drives
=
LIST_HEAD_INIT
(
ide_cdrom_driver
.
drives
),
.
start_power_step
=
ide_cdrom_start_power_step
,
.
start_power_step
=
ide_cdrom_start_power_step
,
.
complete_power_step
=
ide_cdrom_complete_power_step
,
.
complete_power_step
=
ide_cdrom_complete_power_step
,
.
gen_driver
=
{
.
suspend
=
generic_ide_suspend
,
.
resume
=
generic_ide_resume
,
}
};
};
static
int
idecd_open
(
struct
inode
*
inode
,
struct
file
*
file
)
static
int
idecd_open
(
struct
inode
*
inode
,
struct
file
*
file
)
...
...
drivers/ide/ide-disk.c
View file @
505f6a88
...
@@ -1732,10 +1732,6 @@ static ide_driver_t idedisk_driver = {
...
@@ -1732,10 +1732,6 @@ static ide_driver_t idedisk_driver = {
.
drives
=
LIST_HEAD_INIT
(
idedisk_driver
.
drives
),
.
drives
=
LIST_HEAD_INIT
(
idedisk_driver
.
drives
),
.
start_power_step
=
idedisk_start_power_step
,
.
start_power_step
=
idedisk_start_power_step
,
.
complete_power_step
=
idedisk_complete_power_step
,
.
complete_power_step
=
idedisk_complete_power_step
,
.
gen_driver
=
{
.
suspend
=
generic_ide_suspend
,
.
resume
=
generic_ide_resume
,
}
};
};
static
int
idedisk_open
(
struct
inode
*
inode
,
struct
file
*
filp
)
static
int
idedisk_open
(
struct
inode
*
inode
,
struct
file
*
filp
)
...
...
drivers/ide/ide.c
View file @
505f6a88
...
@@ -1534,16 +1534,13 @@ int ata_attach(ide_drive_t *drive)
...
@@ -1534,16 +1534,13 @@ int ata_attach(ide_drive_t *drive)
EXPORT_SYMBOL
(
ata_attach
);
EXPORT_SYMBOL
(
ata_attach
);
int
generic_ide_suspend
(
struct
device
*
dev
,
u32
state
,
u32
level
)
static
int
generic_ide_suspend
(
struct
device
*
dev
,
u32
state
)
{
{
ide_drive_t
*
drive
=
dev
->
driver_data
;
ide_drive_t
*
drive
=
dev
->
driver_data
;
struct
request
rq
;
struct
request
rq
;
struct
request_pm_state
rqpm
;
struct
request_pm_state
rqpm
;
ide_task_t
args
;
ide_task_t
args
;
if
(
level
==
dev
->
power_state
||
level
!=
SUSPEND_SAVE_STATE
)
return
0
;
memset
(
&
rq
,
0
,
sizeof
(
rq
));
memset
(
&
rq
,
0
,
sizeof
(
rq
));
memset
(
&
rqpm
,
0
,
sizeof
(
rqpm
));
memset
(
&
rqpm
,
0
,
sizeof
(
rqpm
));
memset
(
&
args
,
0
,
sizeof
(
args
));
memset
(
&
args
,
0
,
sizeof
(
args
));
...
@@ -1556,18 +1553,13 @@ int generic_ide_suspend(struct device *dev, u32 state, u32 level)
...
@@ -1556,18 +1553,13 @@ int generic_ide_suspend(struct device *dev, u32 state, u32 level)
return
ide_do_drive_cmd
(
drive
,
&
rq
,
ide_wait
);
return
ide_do_drive_cmd
(
drive
,
&
rq
,
ide_wait
);
}
}
EXPORT_SYMBOL
(
generic_ide_suspend
);
static
int
generic_ide_resume
(
struct
device
*
dev
)
int
generic_ide_resume
(
struct
device
*
dev
,
u32
level
)
{
{
ide_drive_t
*
drive
=
dev
->
driver_data
;
ide_drive_t
*
drive
=
dev
->
driver_data
;
struct
request
rq
;
struct
request
rq
;
struct
request_pm_state
rqpm
;
struct
request_pm_state
rqpm
;
ide_task_t
args
;
ide_task_t
args
;
if
(
level
==
dev
->
power_state
||
level
!=
RESUME_RESTORE_STATE
)
return
0
;
memset
(
&
rq
,
0
,
sizeof
(
rq
));
memset
(
&
rq
,
0
,
sizeof
(
rq
));
memset
(
&
rqpm
,
0
,
sizeof
(
rqpm
));
memset
(
&
rqpm
,
0
,
sizeof
(
rqpm
));
memset
(
&
args
,
0
,
sizeof
(
args
));
memset
(
&
args
,
0
,
sizeof
(
args
));
...
@@ -1580,8 +1572,6 @@ int generic_ide_resume(struct device *dev, u32 level)
...
@@ -1580,8 +1572,6 @@ int generic_ide_resume(struct device *dev, u32 level)
return
ide_do_drive_cmd
(
drive
,
&
rq
,
ide_head_wait
);
return
ide_do_drive_cmd
(
drive
,
&
rq
,
ide_head_wait
);
}
}
EXPORT_SYMBOL
(
generic_ide_resume
);
int
generic_ide_ioctl
(
struct
block_device
*
bdev
,
unsigned
int
cmd
,
int
generic_ide_ioctl
(
struct
block_device
*
bdev
,
unsigned
int
cmd
,
unsigned
long
arg
)
unsigned
long
arg
)
{
{
...
@@ -2594,6 +2584,8 @@ EXPORT_SYMBOL(ide_probe);
...
@@ -2594,6 +2584,8 @@ EXPORT_SYMBOL(ide_probe);
struct
bus_type
ide_bus_type
=
{
struct
bus_type
ide_bus_type
=
{
.
name
=
"ide"
,
.
name
=
"ide"
,
.
suspend
=
generic_ide_suspend
,
.
resume
=
generic_ide_resume
,
};
};
/*
/*
...
...
include/linux/ide.h
View file @
505f6a88
...
@@ -1241,8 +1241,6 @@ typedef struct ide_driver_s {
...
@@ -1241,8 +1241,6 @@ typedef struct ide_driver_s {
#define DRIVER(drive) ((drive)->driver)
#define DRIVER(drive) ((drive)->driver)
extern
int
generic_ide_ioctl
(
struct
block_device
*
,
unsigned
,
unsigned
long
);
extern
int
generic_ide_ioctl
(
struct
block_device
*
,
unsigned
,
unsigned
long
);
extern
int
generic_ide_suspend
(
struct
device
*
dev
,
u32
state
,
u32
level
);
extern
int
generic_ide_resume
(
struct
device
*
dev
,
u32
level
);
/*
/*
* IDE modules.
* IDE modules.
...
...
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