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
82f88e36
Commit
82f88e36
authored
Nov 03, 2009
by
Dominik Brodowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcmcia: remove unused "window_t" typedef
Signed-off-by:
Dominik Brodowski
<
linux@dominikbrodowski.net
>
parent
d7b0364b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
37 deletions
+33
-37
drivers/pcmcia/pcmcia_ioctl.c
drivers/pcmcia/pcmcia_ioctl.c
+9
-9
drivers/pcmcia/pcmcia_resource.c
drivers/pcmcia/pcmcia_resource.c
+23
-23
include/pcmcia/ss.h
include/pcmcia/ss.h
+1
-5
No files found.
drivers/pcmcia/pcmcia_ioctl.c
View file @
82f88e36
...
...
@@ -224,7 +224,7 @@ static int pcmcia_adjust_resource_info(adjust_t *adj)
static
int
pcmcia_get_window
(
struct
pcmcia_socket
*
s
,
window_handle_t
*
wh_out
,
window_handle_t
wh
,
win_req_t
*
req
)
{
window_t
*
win
;
pccard_mem_map
*
win
;
window_handle_t
w
;
wh
--
;
...
...
@@ -238,17 +238,17 @@ static int pcmcia_get_window(struct pcmcia_socket *s, window_handle_t *wh_out,
if
(
w
==
MAX_WIN
)
return
-
EINVAL
;
win
=
&
s
->
win
[
w
];
req
->
Base
=
win
->
ctl
.
res
->
start
;
req
->
Size
=
win
->
ctl
.
res
->
end
-
win
->
ctl
.
res
->
start
+
1
;
req
->
AccessSpeed
=
win
->
ctl
.
speed
;
req
->
Base
=
win
->
res
->
start
;
req
->
Size
=
win
->
res
->
end
-
win
->
res
->
start
+
1
;
req
->
AccessSpeed
=
win
->
speed
;
req
->
Attributes
=
0
;
if
(
win
->
ctl
.
flags
&
MAP_ATTRIB
)
if
(
win
->
flags
&
MAP_ATTRIB
)
req
->
Attributes
|=
WIN_MEMORY_TYPE_AM
;
if
(
win
->
ctl
.
flags
&
MAP_ACTIVE
)
if
(
win
->
flags
&
MAP_ACTIVE
)
req
->
Attributes
|=
WIN_ENABLE
;
if
(
win
->
ctl
.
flags
&
MAP_16BIT
)
if
(
win
->
flags
&
MAP_16BIT
)
req
->
Attributes
|=
WIN_DATA_WIDTH_16
;
if
(
win
->
ctl
.
flags
&
MAP_USE_WAIT
)
if
(
win
->
flags
&
MAP_USE_WAIT
)
req
->
Attributes
|=
WIN_USE_WAIT
;
*
wh_out
=
w
+
1
;
...
...
@@ -268,7 +268,7 @@ static int pcmcia_get_mem_page(struct pcmcia_socket *skt, window_handle_t wh,
return
-
EINVAL
;
req
->
Page
=
0
;
req
->
CardOffset
=
skt
->
win
[
wh
].
c
tl
.
c
ard_start
;
req
->
CardOffset
=
skt
->
win
[
wh
].
card_start
;
return
0
;
}
/* pcmcia_get_mem_page */
...
...
drivers/pcmcia/pcmcia_resource.c
View file @
82f88e36
...
...
@@ -197,8 +197,8 @@ int pcmcia_map_mem_page(struct pcmcia_device *p_dev, window_handle_t wh,
dev_dbg
(
&
s
->
dev
,
"failure: requested page is zero
\n
"
);
return
-
EINVAL
;
}
s
->
win
[
wh
].
c
tl
.
c
ard_start
=
req
->
CardOffset
;
if
(
s
->
ops
->
set_mem_map
(
s
,
&
s
->
win
[
wh
]
.
ctl
)
!=
0
)
{
s
->
win
[
wh
].
card_start
=
req
->
CardOffset
;
if
(
s
->
ops
->
set_mem_map
(
s
,
&
s
->
win
[
wh
])
!=
0
)
{
dev_dbg
(
&
s
->
dev
,
"failed to set_mem_map
\n
"
);
return
-
EIO
;
}
...
...
@@ -398,7 +398,7 @@ static int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req)
int
pcmcia_release_window
(
struct
pcmcia_device
*
p_dev
,
window_handle_t
wh
)
{
struct
pcmcia_socket
*
s
=
p_dev
->
socket
;
window_t
*
win
;
pccard_mem_map
*
win
;
wh
--
;
if
(
wh
>=
MAX_WIN
)
...
...
@@ -412,15 +412,15 @@ int pcmcia_release_window(struct pcmcia_device *p_dev, window_handle_t wh)
}
/* Shut down memory window */
win
->
ctl
.
flags
&=
~
MAP_ACTIVE
;
s
->
ops
->
set_mem_map
(
s
,
&
win
->
ctl
);
win
->
flags
&=
~
MAP_ACTIVE
;
s
->
ops
->
set_mem_map
(
s
,
win
);
s
->
state
&=
~
SOCKET_WIN_REQ
(
wh
);
/* Release system memory */
if
(
win
->
ctl
.
res
)
{
release_resource
(
win
->
ctl
.
res
);
kfree
(
win
->
ctl
.
res
);
win
->
ctl
.
res
=
NULL
;
if
(
win
->
res
)
{
release_resource
(
win
->
res
);
kfree
(
win
->
res
);
win
->
res
=
NULL
;
}
p_dev
->
_win
&=
~
CLIENT_WIN_REQ
(
wh
);
...
...
@@ -755,7 +755,7 @@ EXPORT_SYMBOL(pcmcia_request_irq);
int
pcmcia_request_window
(
struct
pcmcia_device
**
p_dev
,
win_req_t
*
req
,
window_handle_t
*
wh
)
{
struct
pcmcia_socket
*
s
=
(
*
p_dev
)
->
socket
;
window_t
*
win
;
pccard_mem_map
*
win
;
u_long
align
;
int
w
;
...
...
@@ -797,9 +797,9 @@ int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_h
win
=
&
s
->
win
[
w
];
if
(
!
(
s
->
features
&
SS_CAP_STATIC_MAP
))
{
win
->
ctl
.
res
=
pcmcia_find_mem_region
(
req
->
Base
,
req
->
Size
,
align
,
win
->
res
=
pcmcia_find_mem_region
(
req
->
Base
,
req
->
Size
,
align
,
(
req
->
Attributes
&
WIN_MAP_BELOW_1MB
),
s
);
if
(
!
win
->
ctl
.
res
)
{
if
(
!
win
->
res
)
{
dev_dbg
(
&
s
->
dev
,
"allocating mem region failed
\n
"
);
return
-
EINVAL
;
}
...
...
@@ -807,19 +807,19 @@ int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_h
(
*
p_dev
)
->
_win
|=
CLIENT_WIN_REQ
(
w
);
/* Configure the socket controller */
win
->
ctl
.
map
=
w
+
1
;
win
->
ctl
.
flags
=
0
;
win
->
ctl
.
speed
=
req
->
AccessSpeed
;
win
->
map
=
w
+
1
;
win
->
flags
=
0
;
win
->
speed
=
req
->
AccessSpeed
;
if
(
req
->
Attributes
&
WIN_MEMORY_TYPE
)
win
->
ctl
.
flags
|=
MAP_ATTRIB
;
win
->
flags
|=
MAP_ATTRIB
;
if
(
req
->
Attributes
&
WIN_ENABLE
)
win
->
ctl
.
flags
|=
MAP_ACTIVE
;
win
->
flags
|=
MAP_ACTIVE
;
if
(
req
->
Attributes
&
WIN_DATA_WIDTH_16
)
win
->
ctl
.
flags
|=
MAP_16BIT
;
win
->
flags
|=
MAP_16BIT
;
if
(
req
->
Attributes
&
WIN_USE_WAIT
)
win
->
ctl
.
flags
|=
MAP_USE_WAIT
;
win
->
c
tl
.
c
ard_start
=
0
;
if
(
s
->
ops
->
set_mem_map
(
s
,
&
win
->
ctl
)
!=
0
)
{
win
->
flags
|=
MAP_USE_WAIT
;
win
->
card_start
=
0
;
if
(
s
->
ops
->
set_mem_map
(
s
,
win
)
!=
0
)
{
dev_dbg
(
&
s
->
dev
,
"failed to set memory mapping
\n
"
);
return
-
EIO
;
}
...
...
@@ -827,9 +827,9 @@ int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_h
/* Return window handle */
if
(
s
->
features
&
SS_CAP_STATIC_MAP
)
{
req
->
Base
=
win
->
ctl
.
static_start
;
req
->
Base
=
win
->
static_start
;
}
else
{
req
->
Base
=
win
->
ctl
.
res
->
start
;
req
->
Base
=
win
->
res
->
start
;
}
*
wh
=
w
+
1
;
...
...
include/pcmcia/ss.h
View file @
82f88e36
...
...
@@ -107,10 +107,6 @@ typedef struct io_window_t {
struct
resource
*
res
;
}
io_window_t
;
typedef
struct
window_t
{
pccard_mem_map
ctl
;
}
window_t
;
/* Maximum number of IO windows per socket */
#define MAX_IO_WIN 2
...
...
@@ -150,7 +146,7 @@ struct pcmcia_socket {
u_int
Config
;
}
irq
;
io_window_t
io
[
MAX_IO_WIN
];
window_t
win
[
MAX_WIN
];
pccard_mem_map
win
[
MAX_WIN
];
struct
list_head
cis_cache
;
size_t
fake_cis_len
;
u8
*
fake_cis
;
...
...
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