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
1d524389
Commit
1d524389
authored
Mar 27, 2004
by
Bartlomiej Zolnierkiewicz
Committed by
Linus Torvalds
Mar 27, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] ide.c: remove unused code for hwif->mmio == 1
parent
5bbb000c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
18 deletions
+10
-18
drivers/ide/ide.c
drivers/ide/ide.c
+9
-17
include/linux/ide.h
include/linux/ide.h
+1
-1
No files found.
drivers/ide/ide.c
View file @
1d524389
...
...
@@ -482,23 +482,14 @@ ide_proc_entry_t generic_subdriver_entries[] = {
static
struct
resource
*
hwif_request_region
(
ide_hwif_t
*
hwif
,
unsigned
long
addr
,
int
num
)
{
struct
resource
*
res
;
if
(
hwif
->
mmio
)
res
=
request_mem_region
(
addr
,
num
,
hwif
->
name
);
else
res
=
request_region
(
addr
,
num
,
hwif
->
name
);
struct
resource
*
res
=
request_region
(
addr
,
num
,
hwif
->
name
);
if
(
!
res
)
printk
(
KERN_ERR
"%s: %s resource 0x%lX-0x%lX not free.
\n
"
,
hwif
->
name
,
hwif
->
mmio
?
"MMIO"
:
"I/O"
,
addr
,
addr
+
num
-
1
);
printk
(
KERN_ERR
"%s: I/O resource 0x%lX-0x%lX not free.
\n
"
,
hwif
->
name
,
addr
,
addr
+
num
-
1
);
return
res
;
}
#define hwif_release_region(addr, num) \
((hwif->mmio) ? release_mem_region((addr),(num)) : release_region((addr),(num)))
/**
* ide_hwif_request_regions - request resources for IDE
* @hwif: interface to use
...
...
@@ -515,6 +506,7 @@ int ide_hwif_request_regions(ide_hwif_t *hwif)
if
(
hwif
->
mmio
==
2
)
return
0
;
BUG_ON
(
hwif
->
mmio
==
1
);
addr
=
hwif
->
io_ports
[
IDE_CONTROL_OFFSET
];
if
(
addr
&&
!
hwif_request_region
(
hwif
,
addr
,
1
))
goto
control_region_busy
;
...
...
@@ -530,7 +522,7 @@ int ide_hwif_request_regions(ide_hwif_t *hwif)
addr
=
hwif
->
io_ports
[
i
];
if
(
!
hwif_request_region
(
hwif
,
addr
,
1
))
{
while
(
--
i
)
hwif_
release_region
(
addr
,
1
);
release_region
(
addr
,
1
);
goto
data_region_busy
;
}
}
...
...
@@ -539,7 +531,7 @@ int ide_hwif_request_regions(ide_hwif_t *hwif)
data_region_busy:
addr
=
hwif
->
io_ports
[
IDE_CONTROL_OFFSET
];
if
(
addr
)
hwif_
release_region
(
addr
,
1
);
release_region
(
addr
,
1
);
control_region_busy:
/* If any errors are return, we drop the hwif interface. */
return
-
EBUSY
;
...
...
@@ -565,14 +557,14 @@ void ide_hwif_release_regions(ide_hwif_t *hwif)
if
(
hwif
->
mmio
==
2
)
return
;
if
(
hwif
->
io_ports
[
IDE_CONTROL_OFFSET
])
hwif_
release_region
(
hwif
->
io_ports
[
IDE_CONTROL_OFFSET
],
1
);
release_region
(
hwif
->
io_ports
[
IDE_CONTROL_OFFSET
],
1
);
if
(
hwif
->
straight8
)
{
hwif_
release_region
(
hwif
->
io_ports
[
IDE_DATA_OFFSET
],
8
);
release_region
(
hwif
->
io_ports
[
IDE_DATA_OFFSET
],
8
);
return
;
}
for
(
i
=
IDE_DATA_OFFSET
;
i
<=
IDE_STATUS_OFFSET
;
i
++
)
if
(
hwif
->
io_ports
[
i
])
hwif_
release_region
(
hwif
->
io_ports
[
i
],
1
);
release_region
(
hwif
->
io_ports
[
i
],
1
);
}
EXPORT_SYMBOL
(
ide_hwif_release_regions
);
...
...
include/linux/ide.h
View file @
1d524389
...
...
@@ -932,7 +932,7 @@ typedef struct hwif_s {
int
sg_dma_direction
;
/* dma transfer direction */
int
sg_dma_active
;
/* is it in use */
int
mmio
;
/* hosts iomio (0)
, mmio (1)
or custom (2) select */
int
mmio
;
/* hosts iomio (0) or custom (2) select */
int
rqsize
;
/* max sectors per request */
int
irq
;
/* our irq number */
...
...
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