Skip to content

Commit 34ccd87

Browse files
jhovoldgregkh
authored andcommitted
w1-gpio: fix unused variable warning
Commit 8a1861d ("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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0123055 commit 34ccd87

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/w1/masters/w1-gpio.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,13 @@ static u8 w1_gpio_read_bit(void *data)
4747
return gpio_get_value(pdata->pin) ? 1 : 0;
4848
}
4949

50+
#if defined(CONFIG_OF)
5051
static struct of_device_id w1_gpio_dt_ids[] = {
5152
{ .compatible = "w1-gpio" },
5253
{}
5354
};
5455
MODULE_DEVICE_TABLE(of, w1_gpio_dt_ids);
56+
#endif
5557

5658
static int w1_gpio_probe_dt(struct platform_device *pdev)
5759
{

0 commit comments

Comments
 (0)