Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
0f19e65b
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看板
提交
0f19e65b
编写于
4月 22, 2008
作者:
M
Mauro Carvalho Chehab
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
V4L/DVB (7264): cx88-cards: always use a level on printk messages
Signed-off-by:
N
Mauro Carvalho Chehab
<
mchehab@infradead.org
>
上级
c450e50e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
41 addition
and
30 deletion
+41
-30
drivers/media/video/cx88/cx88-cards.c
drivers/media/video/cx88/cx88-cards.c
+41
-30
未找到文件。
drivers/media/video/cx88/cx88-cards.c
浏览文件 @
0f19e65b
...
...
@@ -45,6 +45,16 @@ static unsigned int latency = UNSET;
module_param
(
latency
,
int
,
0444
);
MODULE_PARM_DESC
(
latency
,
"pci latency timer"
);
#define info_printk(core, fmt, arg...) \
printk(KERN_INFO "%s: " fmt, core->name , ## arg)
#define warn_printk(core, fmt, arg...) \
printk(KERN_WARNING "%s: " fmt, core->name , ## arg)
#define err_printk(core, fmt, arg...) \
printk(KERN_ERR "%s: " fmt, core->name , ## arg)
/* ------------------------------------------------------------------ */
/* board config info */
...
...
@@ -1915,17 +1925,16 @@ static void leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
if
(
eeprom_data
[
4
]
!=
0x7d
||
eeprom_data
[
5
]
!=
0x10
||
eeprom_data
[
7
]
!=
0x66
)
{
printk
(
KERN_WARNING
"%s: Leadtek eeprom invalid.
\n
"
,
core
->
name
);
warn_printk
(
core
,
"Leadtek eeprom invalid.
\n
"
);
return
;
}
core
->
board
.
tuner_type
=
(
eeprom_data
[
6
]
==
0x13
)
?
TUNER_PHILIPS_FM1236_MK3
:
TUNER_PHILIPS_FM1216ME_MK3
;
printk
(
KERN_INFO
"%s:
Leadtek Winfast 2000XP Expert config: "
"tuner=%d, eeprom[0]=0x%02x
\n
"
,
core
->
name
,
core
->
board
.
tuner_type
,
eeprom_data
[
0
]);
info_printk
(
core
,
"
Leadtek Winfast 2000XP Expert config: "
"tuner=%d, eeprom[0]=0x%02x
\n
"
,
core
->
board
.
tuner_type
,
eeprom_data
[
0
]);
}
static
void
hauppauge_eeprom
(
struct
cx88_core
*
core
,
u8
*
eeprom_data
)
...
...
@@ -1969,13 +1978,12 @@ static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
/* known */
break
;
default:
printk
(
"%s:
warning: unknown hauppauge model #%d
\n
"
,
core
->
name
,
tv
.
model
);
warn_printk
(
core
,
"
warning: unknown hauppauge model #%d
\n
"
,
tv
.
model
);
break
;
}
printk
(
KERN_INFO
"%s: hauppauge eeprom: model=%d
\n
"
,
core
->
name
,
tv
.
model
);
info_printk
(
core
,
"hauppauge eeprom: model=%d
\n
"
,
tv
.
model
);
}
/* ----------------------------------------------------------------------- */
...
...
@@ -2021,8 +2029,7 @@ static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
char
*
name
=
(
eeprom_data
[
0x0d
]
<
ARRAY_SIZE
(
gdi_tuner
))
?
gdi_tuner
[
eeprom_data
[
0x0d
]].
name
:
NULL
;
printk
(
KERN_INFO
"%s: GDI: tuner=%s
\n
"
,
core
->
name
,
name
?
name
:
"unknown"
);
info_printk
(
core
,
"GDI: tuner=%s
\n
"
,
name
?
name
:
"unknown"
);
if
(
NULL
==
name
)
return
;
core
->
board
.
tuner_type
=
gdi_tuner
[
eeprom_data
[
0x0d
]].
id
;
...
...
@@ -2110,7 +2117,8 @@ static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)
msg
.
len
=
(
i
!=
12
?
5
:
2
);
err
=
i2c_transfer
(
&
core
->
i2c_adap
,
&
msg
,
1
);
if
(
err
!=
1
)
{
printk
(
"dvico_fusionhdtv_hybrid_init buf %d failed (err = %d)!
\n
"
,
i
,
err
);
warn_printk
(
core
,
"dvico_fusionhdtv_hybrid_init buf %d "
"failed (err = %d)!
\n
"
,
i
,
err
);
return
;
}
}
...
...
@@ -2135,7 +2143,7 @@ static int cx88_xc2028_tuner_callback(void *priv, int command, int arg)
case
XC2028_TUNER_RESET
:
switch
(
INPUT
(
core
->
input
).
type
)
{
case
CX88_RADIO
:
printk
(
KERN_INFO
"setting GPIO to radio!
\n
"
);
info_printk
(
core
,
"setting GPIO to radio!
\n
"
);
cx_write
(
MO_GP0_IO
,
0x4ff
);
mdelay
(
250
);
cx_write
(
MO_GP2_IO
,
0xff
);
...
...
@@ -2143,7 +2151,7 @@ static int cx88_xc2028_tuner_callback(void *priv, int command, int arg)
break
;
case
CX88_VMUX_DVB
:
/* Digital TV*/
default:
/* Analog TV */
printk
(
KERN_INFO
"setting GPIO to TV!
\n
"
);
info_printk
(
core
,
"setting GPIO to TV!
\n
"
);
break
;
}
cx_write
(
MO_GP1_IO
,
0x101010
);
...
...
@@ -2176,8 +2184,8 @@ static int cx88_xc5000_tuner_callback(void *priv, int command, int arg)
cx_write
(
MO_SRST_IO
,
1
);
return
0
;
}
else
{
printk
(
KERN_ERR
"xc5000: unknown tuner
callback command.
\n
"
);
err_printk
(
core
,
"xc5000: unknown tuner "
"
callback command.
\n
"
);
return
-
EINVAL
;
}
break
;
...
...
@@ -2192,10 +2200,14 @@ int cx88_tuner_callback(void *priv, int command, int arg)
switch
(
core
->
board
.
tuner_type
)
{
case
TUNER_XC2028
:
info_printk
(
core
,
"Calling XC2028/3028 callback
\n
"
);
return
cx88_xc2028_tuner_callback
(
priv
,
command
,
arg
);
case
TUNER_XC5000
:
info_printk
(
core
,
"Calling XC5000 callback
\n
"
);
return
cx88_xc5000_tuner_callback
(
priv
,
command
,
arg
);
}
err_printk
(
core
,
"Error: Calling callback for tuner %d
\n
"
,
core
->
board
.
tuner_type
);
return
-
EINVAL
;
}
EXPORT_SYMBOL
(
cx88_tuner_callback
);
...
...
@@ -2208,23 +2220,25 @@ static void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
if
(
0
==
pci
->
subsystem_vendor
&&
0
==
pci
->
subsystem_device
)
{
printk
(
"%s: Your board has no valid PCI Subsystem ID and thus can't
\n
"
printk
(
KERN_ERR
"%s: Your board has no valid PCI Subsystem ID and thus can't
\n
"
"%s: be autodetected. Please pass card=<n> insmod option to
\n
"
"%s: workaround that. Redirect complaints to the vendor of
\n
"
"%s: the TV card. Best regards,
\n
"
"%s: -- tux
\n
"
,
core
->
name
,
core
->
name
,
core
->
name
,
core
->
name
,
core
->
name
);
}
else
{
printk
(
"%s: Your board isn't known (yet) to the driver. You can
\n
"
printk
(
KERN_ERR
"%s: Your board isn't known (yet) to the driver. You can
\n
"
"%s: try to pick one of the existing card configs via
\n
"
"%s: card=<n> insmod option. Updating to the latest
\n
"
"%s: version might help as well.
\n
"
,
core
->
name
,
core
->
name
,
core
->
name
,
core
->
name
);
}
printk
(
"%s: Here is a list of valid choices for the card=<n> insmod option:
\n
"
,
core
->
name
);
err_printk
(
core
,
"Here is a list of valid choices for the card=<n> "
"insmod option:
\n
"
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
cx88_boards
);
i
++
)
printk
(
"%s: card=%d -> %s
\n
"
,
printk
(
KERN_ERR
"%s: card=%d -> %s
\n
"
,
core
->
name
,
i
,
cx88_boards
[
i
].
name
);
}
...
...
@@ -2335,10 +2349,8 @@ static void cx88_card_setup(struct cx88_core *core)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
buffer
);
i
++
)
if
(
2
!=
i2c_master_send
(
&
core
->
i2c_client
,
buffer
[
i
],
2
))
printk
(
KERN_WARNING
"%s: Unable to enable "
"tuner(%i).
\n
"
,
core
->
name
,
i
);
warn_printk
(
core
,
"Unable to enable "
"tuner(%i).
\n
"
,
i
);
}
break
;
case
CX88_BOARD_MSI_TVANYWHERE_MASTER
:
...
...
@@ -2504,9 +2516,8 @@ struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
memcpy
(
&
core
->
board
,
&
cx88_boards
[
core
->
boardnr
],
sizeof
(
core
->
board
));
printk
(
KERN_INFO
"%s: subsystem: %04x:%04x, board: %s [card=%d,%s]
\n
"
,
core
->
name
,
pci
->
subsystem_vendor
,
pci
->
subsystem_device
,
core
->
board
.
name
,
info_printk
(
core
,
"subsystem: %04x:%04x, board: %s [card=%d,%s]
\n
"
,
pci
->
subsystem_vendor
,
pci
->
subsystem_device
,
core
->
board
.
name
,
core
->
boardnr
,
card
[
core
->
nr
]
==
core
->
boardnr
?
"insmod option"
:
"autodetected"
);
...
...
@@ -2515,8 +2526,8 @@ struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
if
(
radio
[
core
->
nr
]
!=
UNSET
)
core
->
board
.
radio_type
=
radio
[
core
->
nr
];
printk
(
KERN_INFO
"%s:
TV tuner type %d, Radio tuner type %d
\n
"
,
core
->
name
,
core
->
board
.
tuner_type
,
core
->
board
.
radio_type
);
info_printk
(
core
,
"
TV tuner type %d, Radio tuner type %d
\n
"
,
core
->
board
.
tuner_type
,
core
->
board
.
radio_type
);
/* init hardware */
cx88_reset
(
core
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录