Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: vf610: Use of_device_get_match_data()

Use of_device_get_match_data() instead of open-coding it.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Thierry Reding and committed by
Linus Walleij
23e577eb 81317c5a

+1 -3
+1 -3
drivers/gpio/gpio-vf610.c
··· 254 254 255 255 static int vf610_gpio_probe(struct platform_device *pdev) 256 256 { 257 - const struct of_device_id *of_id = of_match_device(vf610_gpio_dt_ids, 258 - &pdev->dev); 259 257 struct device *dev = &pdev->dev; 260 258 struct device_node *np = dev->of_node; 261 259 struct vf610_gpio_port *port; ··· 265 267 if (!port) 266 268 return -ENOMEM; 267 269 268 - port->sdata = of_id->data; 270 + port->sdata = of_device_get_match_data(dev); 269 271 iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); 270 272 port->base = devm_ioremap_resource(dev, iores); 271 273 if (IS_ERR(port->base))