Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34ccd873 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

w1-gpio: fix unused variable warning



Commit 8a1861d9 ("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: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 01230551
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -47,11 +47,13 @@ static u8 w1_gpio_read_bit(void *data)
	return gpio_get_value(pdata->pin) ? 1 : 0;
}

#if defined(CONFIG_OF)
static struct of_device_id w1_gpio_dt_ids[] = {
	{ .compatible = "w1-gpio" },
	{}
};
MODULE_DEVICE_TABLE(of, w1_gpio_dt_ids);
#endif

static int w1_gpio_probe_dt(struct platform_device *pdev)
{