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

gpio: clps711x: remove redundant of_match_ptr()

The driver depends on CONFIG_OF, so it is not necessary to use
of_match_ptr() here.

Even for drivers that do not depend on CONFIG_OF, it's almost always
better to leave out the of_match_ptr(), since the only thing it can
possibly do is to save a few bytes of .text if a driver can be used both
with and without it. Hence we remove of_match_ptr().

Signed-off-by: Zhu Wang <wangzhu9@huawei.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

authored by

Zhu Wang and committed by
Bartosz Golaszewski
a0d22277 a374467a

+2 -2
+2 -2
drivers/gpio/gpio-clps711x.c
··· 67 67 return devm_gpiochip_add_data(&pdev->dev, gc, NULL); 68 68 } 69 69 70 - static const struct of_device_id __maybe_unused clps711x_gpio_ids[] = { 70 + static const struct of_device_id clps711x_gpio_ids[] = { 71 71 { .compatible = "cirrus,ep7209-gpio" }, 72 72 { } 73 73 }; ··· 76 76 static struct platform_driver clps711x_gpio_driver = { 77 77 .driver = { 78 78 .name = "clps711x-gpio", 79 - .of_match_table = of_match_ptr(clps711x_gpio_ids), 79 + .of_match_table = clps711x_gpio_ids, 80 80 }, 81 81 .probe = clps711x_gpio_probe, 82 82 };