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

mfd: cros_ec: spi: Add OF match table

The Documentation/devicetree/bindings/mfd/cros-ec.txt DT binding doc lists
"google,cros-ec-spi" as a compatible string but the corresponding driver
does not have an OF match table. Add the table to the driver so the SPI
core can do an OF style match.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Javier Martinez Canillas and committed by
Lee Jones
a78ea195 1e955bec

+7
+7
drivers/mfd/cros_ec_spi.c
··· 701 701 static SIMPLE_DEV_PM_OPS(cros_ec_spi_pm_ops, cros_ec_spi_suspend, 702 702 cros_ec_spi_resume); 703 703 704 + static const struct of_device_id cros_ec_spi_of_match[] = { 705 + { .compatible = "google,cros-ec-spi", }, 706 + { /* sentinel */ }, 707 + }; 708 + MODULE_DEVICE_TABLE(of, cros_ec_spi_of_match); 709 + 704 710 static const struct spi_device_id cros_ec_spi_id[] = { 705 711 { "cros-ec-spi", 0 }, 706 712 { } ··· 716 710 static struct spi_driver cros_ec_driver_spi = { 717 711 .driver = { 718 712 .name = "cros-ec-spi", 713 + .of_match_table = of_match_ptr(cros_ec_spi_of_match), 719 714 .owner = THIS_MODULE, 720 715 .pm = &cros_ec_spi_pm_ops, 721 716 },