Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gsplhtlxg
clone-Linux
提交
8d5987a6
C
clone-Linux
项目概览
gsplhtlxg
/
clone-Linux
通知
2
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
clone-Linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8d5987a6
编写于
9月 04, 2005
作者:
D
Dmitry Torokhov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Input: make i8042_platform_init return 'real' error code
Signed-off-by:
N
Dmitry Torokhov
<
dtor@mail.ru
>
上级
0854e52d
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
26 addition
and
23 deletion
+26
-23
drivers/input/serio/i8042-io.h
drivers/input/serio/i8042-io.h
+3
-3
drivers/input/serio/i8042-ip22io.h
drivers/input/serio/i8042-ip22io.h
+1
-1
drivers/input/serio/i8042-jazzio.h
drivers/input/serio/i8042-jazzio.h
+1
-1
drivers/input/serio/i8042-sparcio.h
drivers/input/serio/i8042-sparcio.h
+6
-6
drivers/input/serio/i8042-x86ia64io.h
drivers/input/serio/i8042-x86ia64io.h
+12
-10
drivers/input/serio/i8042.c
drivers/input/serio/i8042.c
+3
-2
未找到文件。
drivers/input/serio/i8042-io.h
浏览文件 @
8d5987a6
...
...
@@ -69,16 +69,16 @@ static inline int i8042_platform_init(void)
*/
#if !defined(__sh__) && !defined(__alpha__) && !defined(__mips__) && !defined(CONFIG_PPC64)
if
(
!
request_region
(
I8042_DATA_REG
,
16
,
"i8042"
))
return
-
1
;
return
-
EBUSY
;
#endif
i8042_reset
=
1
;
#if defined(CONFIG_PPC64)
if
(
check_legacy_ioport
(
I8042_DATA_REG
))
return
-
1
;
return
-
EBUSY
;
if
(
!
request_region
(
I8042_DATA_REG
,
16
,
"i8042"
))
return
-
1
;
return
-
EBUSY
;
#endif
return
0
;
}
...
...
drivers/input/serio/i8042-ip22io.h
浏览文件 @
8d5987a6
...
...
@@ -58,7 +58,7 @@ static inline int i8042_platform_init(void)
#if 0
/* XXX sgi_kh is a virtual address */
if (!request_mem_region(sgi_kh, sizeof(struct hpc_keyb), "i8042"))
return
1
;
return
-EBUSY
;
#endif
i8042_reset
=
1
;
...
...
drivers/input/serio/i8042-jazzio.h
浏览文件 @
8d5987a6
...
...
@@ -53,7 +53,7 @@ static inline int i8042_platform_init(void)
#if 0
/* XXX JAZZ_KEYBOARD_ADDRESS is a virtual address */
if (!request_mem_region(JAZZ_KEYBOARD_ADDRESS, 2, "i8042"))
return
1
;
return
-EBUSY
;
#endif
return
0
;
...
...
drivers/input/serio/i8042-sparcio.h
浏览文件 @
8d5987a6
...
...
@@ -48,10 +48,10 @@ static inline void i8042_write_command(int val)
#define OBP_PS2MS_NAME1 "kdmouse"
#define OBP_PS2MS_NAME2 "mouse"
static
int
i8042_platform_init
(
void
)
static
int
__init
i8042_platform_init
(
void
)
{
#ifndef CONFIG_PCI
return
-
1
;
return
-
ENODEV
;
#else
char
prop
[
128
];
int
len
;
...
...
@@ -59,14 +59,14 @@ static int i8042_platform_init(void)
len
=
prom_getproperty
(
prom_root_node
,
"name"
,
prop
,
sizeof
(
prop
));
if
(
len
<
0
)
{
printk
(
"i8042: Cannot get name property of root OBP node.
\n
"
);
return
-
1
;
return
-
ENODEV
;
}
if
(
strncmp
(
prop
,
"SUNW,JavaStation-1"
,
len
)
==
0
)
{
/* Hardcoded values for MrCoffee. */
i8042_kbd_irq
=
i8042_aux_irq
=
13
|
0x20
;
kbd_iobase
=
ioremap
(
0x71300060
,
8
);
if
(
!
kbd_iobase
)
return
-
1
;
return
-
ENODEV
;
}
else
{
struct
linux_ebus
*
ebus
;
struct
linux_ebus_device
*
edev
;
...
...
@@ -78,7 +78,7 @@ static int i8042_platform_init(void)
goto
edev_found
;
}
}
return
-
1
;
return
-
ENODEV
;
edev_found:
for_each_edevchild
(
edev
,
child
)
{
...
...
@@ -96,7 +96,7 @@ static int i8042_platform_init(void)
i8042_aux_irq
==
-
1
)
{
printk
(
"i8042: Error, 8042 device lacks both kbd and "
"mouse nodes.
\n
"
);
return
-
1
;
return
-
ENODEV
;
}
}
...
...
drivers/input/serio/i8042-x86ia64io.h
浏览文件 @
8d5987a6
...
...
@@ -256,7 +256,7 @@ static void i8042_pnp_exit(void)
}
}
static
int
i8042_pnp_init
(
void
)
static
int
__init
i8042_pnp_init
(
void
)
{
int
result_kbd
,
result_aux
;
...
...
@@ -322,25 +322,29 @@ static int i8042_pnp_init(void)
return
0
;
}
#else
static
inline
int
i8042_pnp_init
(
void
)
{
return
0
;
}
static
inline
void
i8042_pnp_exit
(
void
)
{
}
#endif
static
in
line
in
t
i8042_platform_init
(
void
)
static
in
t
__ini
t
i8042_platform_init
(
void
)
{
int
retval
;
/*
* On ix86 platforms touching the i8042 data register region can do really
* bad things. Because of this the region is always reserved on ix86 boxes.
*
* if (!request_region(I8042_DATA_REG, 16, "i8042"))
* return -
1
;
* return -
EBUSY
;
*/
i8042_kbd_irq
=
I8042_MAP_IRQ
(
1
);
i8042_aux_irq
=
I8042_MAP_IRQ
(
12
);
#ifdef CONFIG_PNP
if
(
i8042_pnp_init
())
return
-
1
;
#endif
retval
=
i8042_pnp_init
();
if
(
retval
)
return
retval
;
#if defined(__ia64__)
i8042_reset
=
1
;
...
...
@@ -354,14 +358,12 @@ static inline int i8042_platform_init(void)
i8042_nomux
=
1
;
#endif
return
0
;
return
retval
;
}
static
inline
void
i8042_platform_exit
(
void
)
{
#ifdef CONFIG_PNP
i8042_pnp_exit
();
#endif
}
#endif
/* _I8042_X86IA64IO_H */
drivers/input/serio/i8042.c
浏览文件 @
8d5987a6
...
...
@@ -1066,8 +1066,9 @@ static int __init i8042_init(void)
init_timer
(
&
i8042_timer
);
i8042_timer
.
function
=
i8042_timer_func
;
if
(
i8042_platform_init
())
return
-
EBUSY
;
err
=
i8042_platform_init
();
if
(
err
)
return
err
;
i8042_ports
[
I8042_AUX_PORT_NO
].
irq
=
I8042_AUX_IRQ
;
i8042_ports
[
I8042_KBD_PORT_NO
].
irq
=
I8042_KBD_IRQ
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录