mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 06:10:56 +00:00
i2c: gpio: Fix potential unused warning for 'i2c_gpio_dt_ids'
Dropping a matching #ifdef check along with dropping of_match_ptr() is just a cleanup, while dropping of_match_ptr() that has no corresponding #ifdef fixes an actual warning. Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
This commit is contained in:
parent
cacd9643ec
commit
73e9841ba7
1 changed files with 1 additions and 3 deletions
|
@ -482,19 +482,17 @@ static int i2c_gpio_remove(struct platform_device *pdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_OF)
|
||||
static const struct of_device_id i2c_gpio_dt_ids[] = {
|
||||
{ .compatible = "i2c-gpio", },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(of, i2c_gpio_dt_ids);
|
||||
#endif
|
||||
|
||||
static struct platform_driver i2c_gpio_driver = {
|
||||
.driver = {
|
||||
.name = "i2c-gpio",
|
||||
.of_match_table = of_match_ptr(i2c_gpio_dt_ids),
|
||||
.of_match_table = i2c_gpio_dt_ids,
|
||||
},
|
||||
.probe = i2c_gpio_probe,
|
||||
.remove = i2c_gpio_remove,
|
||||
|
|
Loading…
Reference in a new issue