Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
0a8b13ea
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
0a8b13ea
编写于
12月 09, 2016
作者:
R
Rob Herring
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "of: base: add support to get machine model name"
This reverts commit
e5269794
.
上级
32bed310
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
0 addition
and
38 deletion
+0
-38
drivers/of/base.c
drivers/of/base.c
+0
-32
include/linux/of.h
include/linux/of.h
+0
-6
未找到文件。
drivers/of/base.c
浏览文件 @
0a8b13ea
...
@@ -545,38 +545,6 @@ int of_machine_is_compatible(const char *compat)
...
@@ -545,38 +545,6 @@ int of_machine_is_compatible(const char *compat)
}
}
EXPORT_SYMBOL
(
of_machine_is_compatible
);
EXPORT_SYMBOL
(
of_machine_is_compatible
);
/**
* of_machine_get_model_name - Find and read the model name or the compatible
* value for the machine.
* @model: pointer to null terminated return string, modified only if
* return value is 0.
*
* Returns a string containing either the model name or the compatible value
* of the machine if found, else return error.
*
* Search for a machine model name or the compatible if model name is missing
* in a device tree node and retrieve a null terminated string value (pointer
* to data, not a copy). Returns 0 on success, -EINVAL if root of the device
* tree is not found and other error returned by of_property_read_string on
* failure.
*/
int
of_machine_get_model_name
(
const
char
**
model
)
{
int
error
;
if
(
!
of_node_get
(
of_root
))
return
-
EINVAL
;
error
=
of_property_read_string
(
of_root
,
"model"
,
model
);
if
(
error
)
error
=
of_property_read_string_index
(
of_root
,
"compatible"
,
0
,
model
);
of_node_put
(
of_root
);
return
error
;
}
EXPORT_SYMBOL
(
of_machine_get_model_name
);
/**
/**
* __of_device_is_available - check if a device is available for use
* __of_device_is_available - check if a device is available for use
*
*
...
...
include/linux/of.h
浏览文件 @
0a8b13ea
...
@@ -367,7 +367,6 @@ extern int of_alias_get_id(struct device_node *np, const char *stem);
...
@@ -367,7 +367,6 @@ extern int of_alias_get_id(struct device_node *np, const char *stem);
extern
int
of_alias_get_highest_id
(
const
char
*
stem
);
extern
int
of_alias_get_highest_id
(
const
char
*
stem
);
extern
int
of_machine_is_compatible
(
const
char
*
compat
);
extern
int
of_machine_is_compatible
(
const
char
*
compat
);
extern
int
of_machine_get_model_name
(
const
char
**
model
);
extern
int
of_add_property
(
struct
device_node
*
np
,
struct
property
*
prop
);
extern
int
of_add_property
(
struct
device_node
*
np
,
struct
property
*
prop
);
extern
int
of_remove_property
(
struct
device_node
*
np
,
struct
property
*
prop
);
extern
int
of_remove_property
(
struct
device_node
*
np
,
struct
property
*
prop
);
...
@@ -789,11 +788,6 @@ static inline int of_machine_is_compatible(const char *compat)
...
@@ -789,11 +788,6 @@ static inline int of_machine_is_compatible(const char *compat)
return
0
;
return
0
;
}
}
static
inline
int
of_machine_get_model_name
(
const
char
**
model
)
{
return
-
EINVAL
;
}
static
inline
bool
of_console_check
(
const
struct
device_node
*
dn
,
const
char
*
name
,
int
index
)
static
inline
bool
of_console_check
(
const
struct
device_node
*
dn
,
const
char
*
name
,
int
index
)
{
{
return
false
;
return
false
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录