Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Linux-御风守护者
linux
提交
40b20c25
L
linux
项目概览
Linux-御风守护者
/
linux
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
40b20c25
编写于
12月 20, 2006
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Pull platform-drivers into test branch
上级
cece9014
a8274d57
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
53 addition
and
22 deletion
+53
-22
drivers/acpi/asus_acpi.c
drivers/acpi/asus_acpi.c
+1
-1
drivers/acpi/ibm_acpi.c
drivers/acpi/ibm_acpi.c
+2
-3
drivers/acpi/toshiba_acpi.c
drivers/acpi/toshiba_acpi.c
+2
-1
drivers/acpi/video.c
drivers/acpi/video.c
+34
-7
drivers/misc/msi-laptop.c
drivers/misc/msi-laptop.c
+2
-1
drivers/usb/misc/appledisplay.c
drivers/usb/misc/appledisplay.c
+1
-1
drivers/video/aty/aty128fb.c
drivers/video/aty/aty128fb.c
+1
-1
drivers/video/aty/atyfb_base.c
drivers/video/aty/atyfb_base.c
+1
-1
drivers/video/aty/radeon_backlight.c
drivers/video/aty/radeon_backlight.c
+1
-1
drivers/video/backlight/backlight.c
drivers/video/backlight/backlight.c
+5
-2
drivers/video/nvidia/nv_backlight.c
drivers/video/nvidia/nv_backlight.c
+1
-1
drivers/video/riva/fbdev.c
drivers/video/riva/fbdev.c
+1
-1
include/linux/backlight.h
include/linux/backlight.h
+1
-1
未找到文件。
drivers/acpi/asus_acpi.c
浏览文件 @
40b20c25
...
...
@@ -1401,7 +1401,7 @@ static int __init asus_acpi_init(void)
return
result
;
}
asus_backlight_device
=
backlight_device_register
(
"asus"
,
NULL
,
asus_backlight_device
=
backlight_device_register
(
"asus"
,
NULL
,
NULL
,
&
asus_backlight_data
);
if
(
IS_ERR
(
asus_backlight_device
))
{
printk
(
KERN_ERR
"Could not register asus backlight device
\n
"
);
...
...
drivers/acpi/ibm_acpi.c
浏览文件 @
40b20c25
...
...
@@ -1714,7 +1714,7 @@ static struct backlight_properties ibm_backlight_data = {
static
int
brightness_init
(
void
)
{
ibm_backlight_device
=
backlight_device_register
(
"ibm"
,
NULL
,
ibm_backlight_device
=
backlight_device_register
(
"ibm"
,
NULL
,
NULL
,
&
ibm_backlight_data
);
if
(
IS_ERR
(
ibm_backlight_device
))
{
printk
(
IBM_ERR
"Could not register backlight device
\n
"
);
...
...
@@ -2503,7 +2503,7 @@ static int __init setup_notify(struct ibm_struct *ibm)
ibm
->
name
,
status
);
return
-
ENODEV
;
}
ibm
->
notify_installed
=
1
;
return
0
;
}
...
...
@@ -2580,7 +2580,6 @@ static int __init ibm_init(struct ibm_struct *ibm)
ret
=
setup_notify
(
ibm
);
if
(
ret
<
0
)
return
ret
;
ibm
->
notify_installed
=
1
;
}
return
0
;
...
...
drivers/acpi/toshiba_acpi.c
浏览文件 @
40b20c25
...
...
@@ -590,7 +590,8 @@ static int __init toshiba_acpi_init(void)
remove_proc_entry
(
PROC_TOSHIBA
,
acpi_root_dir
);
}
toshiba_backlight_device
=
backlight_device_register
(
"toshiba"
,
NULL
,
toshiba_backlight_device
=
backlight_device_register
(
"toshiba"
,
NULL
,
NULL
,
&
toshiba_backlight_data
);
if
(
IS_ERR
(
toshiba_backlight_device
))
{
printk
(
KERN_ERR
"Could not register toshiba backlight device
\n
"
);
...
...
drivers/acpi/video.c
浏览文件 @
40b20c25
...
...
@@ -3,6 +3,7 @@
*
* Copyright (C) 2004 Luming Yu <luming.yu@intel.com>
* Copyright (C) 2004 Bruno Ducrot <ducrot@poupinou.org>
* Copyright (C) 2006 Thomas Tuttle <linux-kernel@ttuttle.net>
*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*
...
...
@@ -47,11 +48,11 @@
#define ACPI_VIDEO_NOTIFY_NEXT_OUTPUT 0x83
#define ACPI_VIDEO_NOTIFY_PREV_OUTPUT 0x84
#define ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS 0x8
2
#define ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS 0x8
3
#define ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS 0x8
4
#define ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS 0x8
5
#define ACPI_VIDEO_NOTIFY_DISPLAY_OFF 0x8
6
#define ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS 0x8
5
#define ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS 0x8
6
#define ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS 0x8
7
#define ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS 0x8
8
#define ACPI_VIDEO_NOTIFY_DISPLAY_OFF 0x8
9
#define ACPI_VIDEO_HEAD_INVALID (~0u - 1)
#define ACPI_VIDEO_HEAD_END (~0u)
...
...
@@ -1505,8 +1506,34 @@ static int
acpi_video_get_next_level
(
struct
acpi_video_device
*
device
,
u32
level_current
,
u32
event
)
{
/*Fix me */
return
level_current
;
int
min
,
max
,
min_above
,
max_below
,
i
,
l
;
max
=
max_below
=
0
;
min
=
min_above
=
255
;
for
(
i
=
0
;
i
<
device
->
brightness
->
count
;
i
++
)
{
l
=
device
->
brightness
->
levels
[
i
];
if
(
l
<
min
)
min
=
l
;
if
(
l
>
max
)
max
=
l
;
if
(
l
<
min_above
&&
l
>
level_current
)
min_above
=
l
;
if
(
l
>
max_below
&&
l
<
level_current
)
max_below
=
l
;
}
switch
(
event
)
{
case
ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS
:
return
(
level_current
<
max
)
?
min_above
:
min
;
case
ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS
:
return
(
level_current
<
max
)
?
min_above
:
max
;
case
ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS
:
return
(
level_current
>
min
)
?
max_below
:
min
;
case
ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS
:
case
ACPI_VIDEO_NOTIFY_DISPLAY_OFF
:
return
0
;
default:
return
level_current
;
}
}
static
void
...
...
drivers/misc/msi-laptop.c
浏览文件 @
40b20c25
...
...
@@ -317,7 +317,8 @@ static int __init msi_init(void)
/* Register backlight stuff */
msibl_device
=
backlight_device_register
(
"msi-laptop-bl"
,
NULL
,
&
msibl_props
);
msibl_device
=
backlight_device_register
(
"msi-laptop-bl"
,
NULL
,
NULL
,
&
msibl_props
);
if
(
IS_ERR
(
msibl_device
))
return
PTR_ERR
(
msibl_device
);
...
...
drivers/usb/misc/appledisplay.c
浏览文件 @
40b20c25
...
...
@@ -281,7 +281,7 @@ static int appledisplay_probe(struct usb_interface *iface,
/* Register backlight device */
snprintf
(
bl_name
,
sizeof
(
bl_name
),
"appledisplay%d"
,
atomic_inc_return
(
&
count_displays
)
-
1
);
pdata
->
bd
=
backlight_device_register
(
bl_name
,
pdata
,
pdata
->
bd
=
backlight_device_register
(
bl_name
,
NULL
,
NULL
,
&
appledisplay_bl_data
);
if
(
IS_ERR
(
pdata
->
bd
))
{
err
(
"appledisplay: Backlight registration failed"
);
...
...
drivers/video/aty/aty128fb.c
浏览文件 @
40b20c25
...
...
@@ -1834,7 +1834,7 @@ static void aty128_bl_init(struct aty128fb_par *par)
snprintf
(
name
,
sizeof
(
name
),
"aty128bl%d"
,
info
->
node
);
bd
=
backlight_device_register
(
name
,
par
,
&
aty128_bl_data
);
bd
=
backlight_device_register
(
name
,
info
->
dev
,
par
,
&
aty128_bl_data
);
if
(
IS_ERR
(
bd
))
{
info
->
bl_dev
=
NULL
;
printk
(
KERN_WARNING
"aty128: Backlight registration failed
\n
"
);
...
...
drivers/video/aty/atyfb_base.c
浏览文件 @
40b20c25
...
...
@@ -2211,7 +2211,7 @@ static void aty_bl_init(struct atyfb_par *par)
snprintf
(
name
,
sizeof
(
name
),
"atybl%d"
,
info
->
node
);
bd
=
backlight_device_register
(
name
,
par
,
&
aty_bl_data
);
bd
=
backlight_device_register
(
name
,
info
->
dev
,
par
,
&
aty_bl_data
);
if
(
IS_ERR
(
bd
))
{
info
->
bl_dev
=
NULL
;
printk
(
KERN_WARNING
"aty: Backlight registration failed
\n
"
);
...
...
drivers/video/aty/radeon_backlight.c
浏览文件 @
40b20c25
...
...
@@ -163,7 +163,7 @@ void radeonfb_bl_init(struct radeonfb_info *rinfo)
snprintf
(
name
,
sizeof
(
name
),
"radeonbl%d"
,
rinfo
->
info
->
node
);
bd
=
backlight_device_register
(
name
,
pdata
,
&
radeon_bl_data
);
bd
=
backlight_device_register
(
name
,
rinfo
->
info
->
dev
,
pdata
,
&
radeon_bl_data
);
if
(
IS_ERR
(
bd
))
{
rinfo
->
info
->
bl_dev
=
NULL
;
printk
(
"radeonfb: Backlight registration failed
\n
"
);
...
...
drivers/video/backlight/backlight.c
浏览文件 @
40b20c25
...
...
@@ -216,8 +216,10 @@ static const struct class_device_attribute bl_class_device_attributes[] = {
* Creates and registers new backlight class_device. Returns either an
* ERR_PTR() or a pointer to the newly allocated device.
*/
struct
backlight_device
*
backlight_device_register
(
const
char
*
name
,
void
*
devdata
,
struct
backlight_properties
*
bp
)
struct
backlight_device
*
backlight_device_register
(
const
char
*
name
,
struct
device
*
dev
,
void
*
devdata
,
struct
backlight_properties
*
bp
)
{
int
i
,
rc
;
struct
backlight_device
*
new_bd
;
...
...
@@ -232,6 +234,7 @@ struct backlight_device *backlight_device_register(const char *name, void *devda
new_bd
->
props
=
bp
;
memset
(
&
new_bd
->
class_dev
,
0
,
sizeof
(
new_bd
->
class_dev
));
new_bd
->
class_dev
.
class
=
&
backlight_class
;
new_bd
->
class_dev
.
dev
=
dev
;
strlcpy
(
new_bd
->
class_dev
.
class_id
,
name
,
KOBJ_NAME_LEN
);
class_set_devdata
(
&
new_bd
->
class_dev
,
devdata
);
...
...
drivers/video/nvidia/nv_backlight.c
浏览文件 @
40b20c25
...
...
@@ -141,7 +141,7 @@ void nvidia_bl_init(struct nvidia_par *par)
snprintf
(
name
,
sizeof
(
name
),
"nvidiabl%d"
,
info
->
node
);
bd
=
backlight_device_register
(
name
,
par
,
&
nvidia_bl_data
);
bd
=
backlight_device_register
(
name
,
info
->
dev
,
par
,
&
nvidia_bl_data
);
if
(
IS_ERR
(
bd
))
{
info
->
bl_dev
=
NULL
;
printk
(
KERN_WARNING
"nvidia: Backlight registration failed
\n
"
);
...
...
drivers/video/riva/fbdev.c
浏览文件 @
40b20c25
...
...
@@ -384,7 +384,7 @@ static void riva_bl_init(struct riva_par *par)
snprintf
(
name
,
sizeof
(
name
),
"rivabl%d"
,
info
->
node
);
bd
=
backlight_device_register
(
name
,
par
,
&
riva_bl_data
);
bd
=
backlight_device_register
(
name
,
info
->
dev
,
par
,
&
riva_bl_data
);
if
(
IS_ERR
(
bd
))
{
info
->
bl_dev
=
NULL
;
printk
(
KERN_WARNING
"riva: Backlight registration failed
\n
"
);
...
...
include/linux/backlight.h
浏览文件 @
40b20c25
...
...
@@ -54,7 +54,7 @@ struct backlight_device {
};
extern
struct
backlight_device
*
backlight_device_register
(
const
char
*
name
,
void
*
devdata
,
struct
backlight_properties
*
bp
);
struct
device
*
dev
,
void
*
devdata
,
struct
backlight_properties
*
bp
);
extern
void
backlight_device_unregister
(
struct
backlight_device
*
bd
);
#define to_backlight_device(obj) container_of(obj, struct backlight_device, class_dev)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录