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
a12730f6
Commit
a12730f6
authored
Aug 16, 2003
by
Richard Henderson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[EISA] Update for moving "name" out of struct device.
parent
dd14119a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
+16
-10
drivers/eisa/eisa-bus.c
drivers/eisa/eisa-bus.c
+13
-10
include/linux/eisa.h
include/linux/eisa.h
+3
-0
No files found.
drivers/eisa/eisa-bus.c
View file @
a12730f6
...
...
@@ -25,13 +25,12 @@ struct eisa_device_info {
char
name
[
DEVICE_NAME_SIZE
];
};
static
struct
eisa_device_info
__initdata
eisa_table
[]
=
{
#ifdef CONFIG_EISA_NAMES
static
struct
eisa_device_info
__initdata
eisa_table
[]
=
{
#include "devlist.h"
#endif
};
#define EISA_INFOS (sizeof (eisa_table) / (sizeof (struct eisa_device_info)))
#endif
#define EISA_MAX_FORCED_DEV 16
#define EISA_FORCED_OFFSET 2
...
...
@@ -59,11 +58,11 @@ static int is_forced_dev (int *forced_tab,
static
void
__init
eisa_name_device
(
struct
eisa_device
*
edev
)
{
#ifdef CONFIG_EISA_NAMES
int
i
;
for
(
i
=
0
;
i
<
EISA_INFOS
;
i
++
)
{
if
(
!
strcmp
(
edev
->
id
.
sig
,
eisa_table
[
i
].
id
.
sig
))
{
strlcpy
(
edev
->
dev
.
name
,
strlcpy
(
edev
->
pretty_
name
,
eisa_table
[
i
].
name
,
DEVICE_NAME_SIZE
);
return
;
...
...
@@ -72,6 +71,7 @@ static void __init eisa_name_device (struct eisa_device *edev)
/* No name was found */
sprintf
(
edev
->
dev
.
name
,
"EISA device %.7s"
,
edev
->
id
.
sig
);
#endif
}
static
char
__init
*
decode_eisa_sig
(
unsigned
long
addr
)
...
...
@@ -172,7 +172,6 @@ static int __init eisa_init_device (struct eisa_root_device *root,
{
char
*
sig
;
unsigned
long
sig_addr
;
int
i
;
sig_addr
=
SLOT_ADDRESS
(
root
,
slot
)
+
EISA_VENDOR_ID_OFFSET
;
...
...
@@ -190,8 +189,13 @@ static int __init eisa_init_device (struct eisa_root_device *root,
edev
->
dev
.
dma_mask
=
&
edev
->
dma_mask
;
sprintf
(
edev
->
dev
.
bus_id
,
"%02X:%02X"
,
root
->
bus_nr
,
slot
);
#ifdef CONFIG_EISA_NAMES
{
int
i
;
for
(
i
=
0
;
i
<
EISA_MAX_RESOURCES
;
i
++
)
edev
->
res
[
i
].
name
=
edev
->
dev
.
name
;
edev
->
res
[
i
].
name
=
edev
->
pretty_name
;
}
#endif
if
(
is_forced_dev
(
enable_dev
,
root
,
edev
))
edev
->
state
=
EISA_CONFIG_ENABLED
|
EISA_CONFIG_FORCED
;
...
...
@@ -270,8 +274,7 @@ static int __init eisa_probe (struct eisa_root_device *root)
int
i
,
c
;
struct
eisa_device
*
edev
;
printk
(
KERN_INFO
"EISA: Probing bus %d at %s
\n
"
,
root
->
bus_nr
,
root
->
dev
->
name
);
printk
(
KERN_INFO
"EISA: Probing bus %d
\n
"
,
root
->
bus_nr
);
/* First try to get hold of slot 0. If there is no device
* here, simply fail, unless root->force_probe is set. */
...
...
include/linux/eisa.h
View file @
a12730f6
...
...
@@ -42,6 +42,9 @@ struct eisa_device {
struct
resource
res
[
EISA_MAX_RESOURCES
];
u64
dma_mask
;
struct
device
dev
;
/* generic device */
#ifdef CONFIG_EISA_NAMES
char
pretty_name
[
DEVICE_NAME_SIZE
];
#endif
};
#define to_eisa_device(n) container_of(n, struct eisa_device, dev)
...
...
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