X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=drivers%2Fspi%2Fspi-xlp.c;h=4071a729eb2f2af5ffd8f81c9113c026a07d3e34;hb=997b611baf7591ea5119539ee821a3e2f4fcf24e;hp=8f04feca6ee3b66421c67589e6570f633aba0dae;hpb=9e17f9070280bd58af9aead415544387a7a61427;p=cascardo%2Flinux.git diff --git a/drivers/spi/spi-xlp.c b/drivers/spi/spi-xlp.c index 8f04feca6ee3..4071a729eb2f 100644 --- a/drivers/spi/spi-xlp.c +++ b/drivers/spi/spi-xlp.c @@ -11,6 +11,7 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ +#include #include #include #include @@ -405,8 +406,9 @@ static int xlp_spi_probe(struct platform_device *pdev) clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(clk)) { dev_err(&pdev->dev, "could not get spi clock\n"); - return -ENODEV; + return PTR_ERR(clk); } + xspi->spi_clk = clk_get_rate(clk); master = spi_alloc_master(&pdev->dev, 0); @@ -437,6 +439,14 @@ static int xlp_spi_probe(struct platform_device *pdev) return 0; } +#ifdef CONFIG_ACPI +static const struct acpi_device_id xlp_spi_acpi_match[] = { + { "BRCM900D", 0 }, + { }, +}; +MODULE_DEVICE_TABLE(acpi, xlp_spi_acpi_match); +#endif + static const struct of_device_id xlp_spi_dt_id[] = { { .compatible = "netlogic,xlp832-spi" }, { }, @@ -447,6 +457,7 @@ static struct platform_driver xlp_spi_driver = { .driver = { .name = "xlp-spi", .of_match_table = xlp_spi_dt_id, + .acpi_match_table = ACPI_PTR(xlp_spi_acpi_match), }, }; module_platform_driver(xlp_spi_driver);