Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
3285e0ec
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
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看板
提交
3285e0ec
编写于
9月 19, 2011
作者:
J
Jean-Christophe PLAGNIOL-VILLARD
提交者:
Arnd Bergmann
11月 29, 2011
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ARM: at91/udc: use gpio_is_valid to check the gpio
Signed-off-by:
N
Jean-Christophe PLAGNIOL-VILLARD
<
plagnioj@jcrosoft.com
>
上级
8a7a49d1
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
7 addition
and
7 deletion
+7
-7
drivers/usb/gadget/at91_udc.c
drivers/usb/gadget/at91_udc.c
+7
-7
未找到文件。
drivers/usb/gadget/at91_udc.c
浏览文件 @
3285e0ec
...
@@ -1748,7 +1748,7 @@ static int __init at91udc_probe(struct platform_device *pdev)
...
@@ -1748,7 +1748,7 @@ static int __init at91udc_probe(struct platform_device *pdev)
/* rm9200 needs manual D+ pullup; off by default */
/* rm9200 needs manual D+ pullup; off by default */
if
(
cpu_is_at91rm9200
())
{
if
(
cpu_is_at91rm9200
())
{
if
(
udc
->
board
.
pullup_pin
<=
0
)
{
if
(
gpio_is_valid
(
udc
->
board
.
pullup_pin
)
)
{
DBG
(
"no D+ pullup?
\n
"
);
DBG
(
"no D+ pullup?
\n
"
);
retval
=
-
ENODEV
;
retval
=
-
ENODEV
;
goto
fail0
;
goto
fail0
;
...
@@ -1815,7 +1815,7 @@ static int __init at91udc_probe(struct platform_device *pdev)
...
@@ -1815,7 +1815,7 @@ static int __init at91udc_probe(struct platform_device *pdev)
DBG
(
"request irq %d failed
\n
"
,
udc
->
udp_irq
);
DBG
(
"request irq %d failed
\n
"
,
udc
->
udp_irq
);
goto
fail1
;
goto
fail1
;
}
}
if
(
udc
->
board
.
vbus_pin
>
0
)
{
if
(
gpio_is_valid
(
udc
->
board
.
vbus_pin
)
)
{
retval
=
gpio_request
(
udc
->
board
.
vbus_pin
,
"udc_vbus"
);
retval
=
gpio_request
(
udc
->
board
.
vbus_pin
,
"udc_vbus"
);
if
(
retval
<
0
)
{
if
(
retval
<
0
)
{
DBG
(
"request vbus pin failed
\n
"
);
DBG
(
"request vbus pin failed
\n
"
);
...
@@ -1859,10 +1859,10 @@ static int __init at91udc_probe(struct platform_device *pdev)
...
@@ -1859,10 +1859,10 @@ static int __init at91udc_probe(struct platform_device *pdev)
INFO
(
"%s version %s
\n
"
,
driver_name
,
DRIVER_VERSION
);
INFO
(
"%s version %s
\n
"
,
driver_name
,
DRIVER_VERSION
);
return
0
;
return
0
;
fail4:
fail4:
if
(
udc
->
board
.
vbus_pin
>
0
&&
!
udc
->
board
.
vbus_polled
)
if
(
gpio_is_valid
(
udc
->
board
.
vbus_pin
)
&&
!
udc
->
board
.
vbus_polled
)
free_irq
(
udc
->
board
.
vbus_pin
,
udc
);
free_irq
(
udc
->
board
.
vbus_pin
,
udc
);
fail3:
fail3:
if
(
udc
->
board
.
vbus_pin
>
0
)
if
(
gpio_is_valid
(
udc
->
board
.
vbus_pin
)
)
gpio_free
(
udc
->
board
.
vbus_pin
);
gpio_free
(
udc
->
board
.
vbus_pin
);
fail2:
fail2:
free_irq
(
udc
->
udp_irq
,
udc
);
free_irq
(
udc
->
udp_irq
,
udc
);
...
@@ -1897,7 +1897,7 @@ static int __exit at91udc_remove(struct platform_device *pdev)
...
@@ -1897,7 +1897,7 @@ static int __exit at91udc_remove(struct platform_device *pdev)
device_init_wakeup
(
&
pdev
->
dev
,
0
);
device_init_wakeup
(
&
pdev
->
dev
,
0
);
remove_debug_file
(
udc
);
remove_debug_file
(
udc
);
if
(
udc
->
board
.
vbus_pin
>
0
)
{
if
(
gpio_is_valid
(
udc
->
board
.
vbus_pin
)
)
{
free_irq
(
udc
->
board
.
vbus_pin
,
udc
);
free_irq
(
udc
->
board
.
vbus_pin
,
udc
);
gpio_free
(
udc
->
board
.
vbus_pin
);
gpio_free
(
udc
->
board
.
vbus_pin
);
}
}
...
@@ -1941,7 +1941,7 @@ static int at91udc_suspend(struct platform_device *pdev, pm_message_t mesg)
...
@@ -1941,7 +1941,7 @@ static int at91udc_suspend(struct platform_device *pdev, pm_message_t mesg)
enable_irq_wake
(
udc
->
udp_irq
);
enable_irq_wake
(
udc
->
udp_irq
);
udc
->
active_suspend
=
wake
;
udc
->
active_suspend
=
wake
;
if
(
udc
->
board
.
vbus_pin
>
0
&&
!
udc
->
board
.
vbus_polled
&&
wake
)
if
(
gpio_is_valid
(
udc
->
board
.
vbus_pin
)
&&
!
udc
->
board
.
vbus_polled
&&
wake
)
enable_irq_wake
(
udc
->
board
.
vbus_pin
);
enable_irq_wake
(
udc
->
board
.
vbus_pin
);
return
0
;
return
0
;
}
}
...
@@ -1951,7 +1951,7 @@ static int at91udc_resume(struct platform_device *pdev)
...
@@ -1951,7 +1951,7 @@ static int at91udc_resume(struct platform_device *pdev)
struct
at91_udc
*
udc
=
platform_get_drvdata
(
pdev
);
struct
at91_udc
*
udc
=
platform_get_drvdata
(
pdev
);
unsigned
long
flags
;
unsigned
long
flags
;
if
(
udc
->
board
.
vbus_pin
>
0
&&
!
udc
->
board
.
vbus_polled
&&
if
(
gpio_is_valid
(
udc
->
board
.
vbus_pin
)
&&
!
udc
->
board
.
vbus_polled
&&
udc
->
active_suspend
)
udc
->
active_suspend
)
disable_irq_wake
(
udc
->
board
.
vbus_pin
);
disable_irq_wake
(
udc
->
board
.
vbus_pin
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录