Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
82f88e36
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
161
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
82f88e36
编写于
11月 03, 2009
作者:
D
Dominik Brodowski
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
pcmcia: remove unused "window_t" typedef
Signed-off-by:
N
Dominik Brodowski
<
linux@dominikbrodowski.net
>
上级
d7b0364b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
33 addition
and
37 deletion
+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
未找到文件。
drivers/pcmcia/pcmcia_ioctl.c
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录