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
1a28d3fd
Commit
1a28d3fd
authored
Jun 09, 2003
by
Patrick Mochel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[i8259] Convert to use new system device API.
parent
3cc944bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
34 deletions
+26
-34
arch/i386/kernel/i8259.c
arch/i386/kernel/i8259.c
+26
-34
No files found.
arch/i386/kernel/i8259.c
View file @
1a28d3fd
...
@@ -238,35 +238,31 @@ void mask_and_ack_8259A(unsigned int irq)
...
@@ -238,35 +238,31 @@ void mask_and_ack_8259A(unsigned int irq)
}
}
}
}
static
int
i8259A_resume
(
struct
device
*
dev
,
u32
level
)
static
int
i8259A_resume
(
struct
sys_device
*
dev
)
{
{
if
(
level
==
RESUME_POWER_ON
)
init_8259A
(
0
);
init_8259A
(
0
);
return
0
;
return
0
;
}
}
static
struct
device_driver
i8259A_driver
=
{
static
struct
sysdev_class
i8259_sysdev_class
=
{
.
name
=
"pic"
,
set_kset_name
(
"i8259"
),
.
bus
=
&
system_bus_type
,
.
resume
=
i8259A_resume
,
.
resume
=
i8259A_resume
,
};
};
static
struct
sys_device
device_i8259A
=
{
static
struct
sys_device
device_i8259A
=
{
.
name
=
"pic"
,
.
id
=
0
,
.
id
=
0
,
.
cls
=
&
i8259_sysdev_class
,
.
dev
=
{
.
name
=
"i8259A PIC"
,
.
driver
=
&
i8259A_driver
,
},
};
};
static
int
__init
i
nit_8259A_device
fs
(
void
)
static
int
__init
i
8259A_init_sys
fs
(
void
)
{
{
driver_register
(
&
i8259A_driver
);
int
error
=
sysdev_class_register
(
&
i8259_sysdev_class
);
return
sys_device_register
(
&
device_i8259A
);
if
(
!
error
)
error
=
sys_device_register
(
&
device_i8259A
);
return
error
;
}
}
device_initcall
(
i
nit_8259A_device
fs
);
device_initcall
(
i
8259A_init_sys
fs
);
void
init_8259A
(
int
auto_eoi
)
void
init_8259A
(
int
auto_eoi
)
{
{
...
@@ -385,35 +381,31 @@ static void setup_timer(void)
...
@@ -385,35 +381,31 @@ static void setup_timer(void)
spin_unlock_irqrestore
(
&
i8253_lock
,
flags
);
spin_unlock_irqrestore
(
&
i8253_lock
,
flags
);
}
}
static
int
timer_resume
(
struct
device
*
dev
,
u32
level
)
static
int
timer_resume
(
struct
sys_device
*
dev
)
{
{
if
(
level
==
RESUME_POWER_ON
)
setup_timer
();
setup_timer
();
return
0
;
return
0
;
}
}
static
struct
device_driver
timer_driver
=
{
static
struct
sysdev_class
timer_sysclass
=
{
.
name
=
"timer"
,
set_kset_name
(
"timer"
),
.
bus
=
&
system_bus_type
,
.
resume
=
timer_resume
,
.
resume
=
timer_resume
,
};
};
static
struct
sys_device
device_timer
=
{
static
struct
sys_device
device_timer
=
{
.
name
=
"timer"
,
.
id
=
0
,
.
id
=
0
,
.
cls
=
&
timer_sysclass
,
.
dev
=
{
.
name
=
"timer"
,
.
driver
=
&
timer_driver
,
},
};
};
static
int
__init
init_timer_
device
fs
(
void
)
static
int
__init
init_timer_
sys
fs
(
void
)
{
{
driver_register
(
&
timer_driver
);
int
error
=
sysdev_class_register
(
&
timer_sysclass
);
return
sys_device_register
(
&
device_timer
);
if
(
!
error
)
error
=
sys_device_register
(
&
device_timer
);
return
error
;
}
}
device_initcall
(
init_timer_
device
fs
);
device_initcall
(
init_timer_
sys
fs
);
void
__init
init_IRQ
(
void
)
void
__init
init_IRQ
(
void
)
{
{
...
...
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