Skip to content

Commit 73e9841

Browse files
AaronDotwsakernel
authored andcommitted
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 <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Binbin Zhou <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent cacd964 commit 73e9841

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/i2c/busses/i2c-gpio.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -482,19 +482,17 @@ static int i2c_gpio_remove(struct platform_device *pdev)
482482
return 0;
483483
}
484484

485-
#if defined(CONFIG_OF)
486485
static const struct of_device_id i2c_gpio_dt_ids[] = {
487486
{ .compatible = "i2c-gpio", },
488487
{ /* sentinel */ }
489488
};
490489

491490
MODULE_DEVICE_TABLE(of, i2c_gpio_dt_ids);
492-
#endif
493491

494492
static struct platform_driver i2c_gpio_driver = {
495493
.driver = {
496494
.name = "i2c-gpio",
497-
.of_match_table = of_match_ptr(i2c_gpio_dt_ids),
495+
.of_match_table = i2c_gpio_dt_ids,
498496
},
499497
.probe = i2c_gpio_probe,
500498
.remove = i2c_gpio_remove,

0 commit comments

Comments
 (0)