From: Mark Brown Date: Mon, 11 Jan 2016 16:48:33 +0000 (+0000) Subject: Merge remote-tracking branches 'spi/topic/lm70llp', 'spi/topic/loopback', 'spi/topic... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=41d5a700514f133991db0d9d135e597b88b09775;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git Merge remote-tracking branches 'spi/topic/lm70llp', 'spi/topic/loopback', 'spi/topic/mtk' and 'spi/topic/omap2-mcspi' into spi-next --- 41d5a700514f133991db0d9d135e597b88b09775 diff --cc drivers/spi/spi-mt65xx.c index 4895fe3944f1,563954a61424,563954a61424,dedc4dd9d78a,563954a61424..0be89e052428 --- a/drivers/spi/spi-mt65xx.c +++ b/drivers/spi/spi-mt65xx.c @@@@@@ -637,26 -629,16 -629,16 -635,26 -629,16 +643,26 @@@@@@ static int mtk_spi_probe(struct platfor "pad_num does not match num_chipselect(%d != %d)\n", mdata->pad_num, master->num_chipselect); ret = -EINVAL; --- - goto err_put_master; +++ + goto err_disable_runtime_pm; } -- - for (i = 0; i < master->num_chipselect; i++) { -- - ret = devm_gpio_request(&pdev->dev, master->cs_gpios[i], -- - dev_name(&pdev->dev)); -- - if (ret) { -- - dev_err(&pdev->dev, -- - "can't get CS GPIO %i\n", i); -- - goto err_put_master; ++ + if (!master->cs_gpios && master->num_chipselect > 1) { ++ + dev_err(&pdev->dev, ++ + "cs_gpios not specified and num_chipselect > 1\n"); ++ + ret = -EINVAL; - goto err_put_master; +++ + goto err_disable_runtime_pm; ++ + } ++ + ++ + if (master->cs_gpios) { ++ + for (i = 0; i < master->num_chipselect; i++) { ++ + ret = devm_gpio_request(&pdev->dev, ++ + master->cs_gpios[i], ++ + dev_name(&pdev->dev)); ++ + if (ret) { ++ + dev_err(&pdev->dev, ++ + "can't get CS GPIO %i\n", i); - goto err_put_master; +++ + goto err_disable_runtime_pm; ++ + } } } }