Skip to content

Commit

Permalink
w1: constify of_device_id array
Browse files Browse the repository at this point in the history
of_device_id is always used as const.
(See driver.of_match_table and open firmware functions)

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Fabian Frederick authored and Greg Kroah-Hartman committed Mar 25, 2015
1 parent 4d8beff commit 0a56c0e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/w1/masters/mxc_w1.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ static int mxc_w1_remove(struct platform_device *pdev)
return 0;
}

static struct of_device_id mxc_w1_dt_ids[] = {
static const struct of_device_id mxc_w1_dt_ids[] = {
{ .compatible = "fsl,imx21-owire" },
{ /* sentinel */ }
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/w1/masters/omap_hdq.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ struct hdq_data {
static int omap_hdq_probe(struct platform_device *pdev);
static int omap_hdq_remove(struct platform_device *pdev);

static struct of_device_id omap_hdq_dt_ids[] = {
static const struct of_device_id omap_hdq_dt_ids[] = {
{ .compatible = "ti,omap3-1w" },
{}
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/w1/masters/w1-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static u8 w1_gpio_read_bit(void *data)
}

#if defined(CONFIG_OF)
static struct of_device_id w1_gpio_dt_ids[] = {
static const struct of_device_id w1_gpio_dt_ids[] = {
{ .compatible = "w1-gpio" },
{}
};
Expand Down

0 comments on commit 0a56c0e

Please sign in to comment.