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
ec9e8eb6
Commit
ec9e8eb6
authored
Mar 14, 2002
by
William Stinson
Committed by
Jeff Garzik
Mar 14, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Janitor: request_region cleanups for stallion serial driver
parent
bc14d0aa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
27 deletions
+36
-27
drivers/char/stallion.c
drivers/char/stallion.c
+36
-27
No files found.
drivers/char/stallion.c
View file @
ec9e8eb6
...
...
@@ -2402,16 +2402,23 @@ static inline int stl_initeio(stlbrd_t *brdp)
brdp
->
ioctrl
);
}
if
(
check_region
(
brdp
->
ioaddr1
,
brdp
->
iosize1
))
{
printk
(
"STALLION: Warning, board %d I/O address %x conflicts "
"with another device
\n
"
,
brdp
->
brdnr
,
brdp
->
ioaddr1
);
}
if
(
brdp
->
iosize2
>
0
)
{
if
(
check_region
(
brdp
->
ioaddr2
,
brdp
->
iosize2
))
{
printk
(
"STALLION: Warning, board %d I/O address %x "
"conflicts with another device
\n
"
,
brdp
->
brdnr
,
brdp
->
ioaddr2
);
if
(
!
request_region
(
brdp
->
ioaddr1
,
brdp
->
iosize1
,
name
))
{
printk
(
KERN_WARNING
"STALLION: Warning, board %d I/O address "
"%x conflicts with another device
\n
"
,
brdp
->
brdnr
,
brdp
->
ioaddr1
);
return
(
-
EBUSY
);
}
if
(
brdp
->
iosize2
>
0
)
if
(
!
request_region
(
brdp
->
ioaddr2
,
brdp
->
iosize2
,
name
))
{
printk
(
KERN_WARNING
"STALLION: Warning, board %d I/O "
"address %x conflicts with another device
\n
"
,
brdp
->
brdnr
,
brdp
->
ioaddr2
);
printk
(
KERN_WARNING
"STALLION: Warning, also "
"releasing board %d I/O address %x
\n
"
,
brdp
->
brdnr
,
brdp
->
ioaddr1
);
release_region
(
brdp
->
ioaddr1
,
brdp
->
iosize1
);
return
(
-
EBUSY
);
}
/*
...
...
@@ -2454,14 +2461,11 @@ static inline int stl_initeio(stlbrd_t *brdp)
* We have verfied that the board is actually present, so now we
* can complete the setup.
*/
request_region
(
brdp
->
ioaddr1
,
brdp
->
iosize1
,
name
);
if
(
brdp
->
iosize2
>
0
)
request_region
(
brdp
->
ioaddr2
,
brdp
->
iosize2
,
name
);
panelp
=
(
stlpanel_t
*
)
stl_memalloc
(
sizeof
(
stlpanel_t
));
if
(
panelp
==
(
stlpanel_t
*
)
NULL
)
{
printk
(
"STALLION: failed to allocate memory (size=%d)
\n
"
,
sizeof
(
stlpanel_t
));
printk
(
KERN_WARNING
"STALLION: failed to allocate memory "
"(size=%d)
\n
"
,
sizeof
(
stlpanel_t
));
return
(
-
ENOMEM
);
}
memset
(
panelp
,
0
,
sizeof
(
stlpanel_t
));
...
...
@@ -2585,22 +2589,27 @@ static int inline stl_initech(stlbrd_t *brdp)
}
/*
* Check boards for possible IO address conflicts
. We won't actually
*
do anything about it here, just issue a warning..
.
* Check boards for possible IO address conflicts
and return fail status
*
if an IO conflict found
.
*/
conflict
=
check_region
(
brdp
->
ioaddr1
,
brdp
->
iosize1
)
?
brdp
->
ioaddr1
:
0
;
if
((
conflict
==
0
)
&&
(
brdp
->
iosize2
>
0
))
conflict
=
check_region
(
brdp
->
ioaddr2
,
brdp
->
iosize2
)
?
brdp
->
ioaddr2
:
0
;
if
(
conflict
)
{
printk
(
"STALLION: Warning, board %d I/O address %x conflicts "
"with another device
\n
"
,
brdp
->
brdnr
,
conflict
);
if
(
!
request_region
(
brdp
->
ioaddr1
,
brdp
->
iosize1
,
name
))
{
printk
(
KERN_WARNING
"STALLION: Warning, board %d I/O address "
"%x conflicts with another device
\n
"
,
brdp
->
brdnr
,
brdp
->
ioaddr1
);
return
(
-
EBUSY
);
}
request_region
(
brdp
->
ioaddr1
,
brdp
->
iosize1
,
name
);
if
(
brdp
->
iosize2
>
0
)
request_region
(
brdp
->
ioaddr2
,
brdp
->
iosize2
,
name
);
if
(
!
request_region
(
brdp
->
ioaddr2
,
brdp
->
iosize2
,
name
))
{
printk
(
KERN_WARNING
"STALLION: Warning, board %d I/O "
"address %x conflicts with another device
\n
"
,
brdp
->
brdnr
,
brdp
->
ioaddr2
);
printk
(
KERN_WARNING
"STALLION: Warning, also "
"releasing board %d I/O address %x
\n
"
,
brdp
->
brdnr
,
brdp
->
ioaddr1
);
release_region
(
brdp
->
ioaddr1
,
brdp
->
iosize1
);
return
(
-
EBUSY
);
}
/*
* Scan through the secondary io address space looking for panels.
...
...
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