提交 54e5bc02 编写于 作者: A Andres Salomon 提交者: H. Peter Anvin

x86, olpc: Constify an olpc_ofw() arg

The arguments passed to OFW shouldn't be modified; update the 'args'
argument of olpc_ofw to reflect this.  This saves us some later
casting away of consts.
Signed-off-by: NAndres Salomon <dilinger@queued.net>
LKML-Reference: <20100628220029.1555ac24@debian>
Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
上级 25971865
......@@ -12,7 +12,7 @@
#define olpc_ofw(name, args, res) \
__olpc_ofw((name), ARRAY_SIZE(args), args, ARRAY_SIZE(res), res)
extern int __olpc_ofw(const char *name, int nr_args, void **args, int nr_res,
extern int __olpc_ofw(const char *name, int nr_args, const void **args, int nr_res,
void **res);
/* determine whether OFW is available and lives in the proper memory */
......
......@@ -188,7 +188,7 @@ static void __init platform_detect(void)
{
size_t propsize;
__be32 rev;
void *args[] = { NULL, "board-revision-int", &rev, (void *)4 };
const void *args[] = { NULL, "board-revision-int", &rev, (void *)4 };
void *res[] = { &propsize };
if (olpc_ofw("getprop", args, res) || propsize != 4) {
......
......@@ -40,7 +40,7 @@ void __init setup_olpc_ofw_pgd(void)
early_iounmap(base, sizeof(olpc_ofw_pgd) * PTRS_PER_PGD);
}
int __olpc_ofw(const char *name, int nr_args, void **args, int nr_res,
int __olpc_ofw(const char *name, int nr_args, const void **args, int nr_res,
void **res)
{
int ofw_args[MAXARGS + 3];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册