of/unittest: add const where needed
Fix warnings pointed out by checkpatch. No bugs fixed, but the test code should be a good example of how to use the devicetree API. Signed-off-by: Frank Rowand <frank.rowand@sonymobile.com> Signed-off-by: Grant Likely <grant.likely@linaro.org>
This commit is contained in:
parent
3eb46a1da7
commit
afaed7a993
|
@ -680,7 +680,7 @@ static void __init of_selftest_parse_interrupts_extended(void)
|
||||||
of_node_put(np);
|
of_node_put(np);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct of_device_id match_node_table[] = {
|
static const struct of_device_id match_node_table[] = {
|
||||||
{ .data = "A", .name = "name0", }, /* Name alone is lowest priority */
|
{ .data = "A", .name = "name0", }, /* Name alone is lowest priority */
|
||||||
{ .data = "B", .type = "type1", }, /* followed by type alone */
|
{ .data = "B", .type = "type1", }, /* followed by type alone */
|
||||||
|
|
||||||
|
@ -754,7 +754,7 @@ static void __init of_selftest_platform_populate(void)
|
||||||
int irq, rc;
|
int irq, rc;
|
||||||
struct device_node *np, *child, *grandchild;
|
struct device_node *np, *child, *grandchild;
|
||||||
struct platform_device *pdev;
|
struct platform_device *pdev;
|
||||||
struct of_device_id match[] = {
|
const struct of_device_id match[] = {
|
||||||
{ .compatible = "test-device", },
|
{ .compatible = "test-device", },
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
@ -953,7 +953,7 @@ static int selftest_remove(struct platform_device *pdev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct of_device_id selftest_match[] = {
|
static const struct of_device_id selftest_match[] = {
|
||||||
{ .compatible = "selftest", },
|
{ .compatible = "selftest", },
|
||||||
{},
|
{},
|
||||||
};
|
};
|
||||||
|
@ -1545,7 +1545,7 @@ static int selftest_i2c_bus_remove(struct platform_device *pdev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct of_device_id selftest_i2c_bus_match[] = {
|
static const struct of_device_id selftest_i2c_bus_match[] = {
|
||||||
{ .compatible = "selftest-i2c-bus", },
|
{ .compatible = "selftest-i2c-bus", },
|
||||||
{},
|
{},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue