aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2013-03-08 05:08:00 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-12 19:20:46 -0400
commit34ccd8738e34180af34544d2bdd053e60e44a224 (patch)
tree2c421c9d61eed8fdde484393fb4a182166f54d7e /drivers/w1
parent01230551e7c2fb9a1c2519b356d703851049cbe0 (diff)
w1-gpio: fix unused variable warning
Commit 8a1861d997 ("w1-gpio: Simplify & get rid of defines") removed the compile guards from the device-tree id table, thereby generating a warning when building without device-tree support. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/w1')
-rw-r--r--drivers/w1/masters/w1-gpio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c
index 012817abb12f..46d97014342e 100644
--- a/drivers/w1/masters/w1-gpio.c
+++ b/drivers/w1/masters/w1-gpio.c
@@ -47,11 +47,13 @@ static u8 w1_gpio_read_bit(void *data)
47 return gpio_get_value(pdata->pin) ? 1 : 0; 47 return gpio_get_value(pdata->pin) ? 1 : 0;
48} 48}
49 49
50#if defined(CONFIG_OF)
50static struct of_device_id w1_gpio_dt_ids[] = { 51static struct of_device_id w1_gpio_dt_ids[] = {
51 { .compatible = "w1-gpio" }, 52 { .compatible = "w1-gpio" },
52 {} 53 {}
53}; 54};
54MODULE_DEVICE_TABLE(of, w1_gpio_dt_ids); 55MODULE_DEVICE_TABLE(of, w1_gpio_dt_ids);
56#endif
55 57
56static int w1_gpio_probe_dt(struct platform_device *pdev) 58static int w1_gpio_probe_dt(struct platform_device *pdev)
57{ 59{