Merge remote-tracking branches 'spi/topic/lm70llp', 'spi/topic/loopback', 'spi/topic...
authorMark Brown <broonie@kernel.org>
Mon, 11 Jan 2016 16:48:33 +0000 (16:48 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 11 Jan 2016 16:48:33 +0000 (16:48 +0000)
1  2  3  4  5 
drivers/spi/spi-mt65xx.c
include/linux/spi/spi.h

index 4895fe3944f198049c9e8708395e8576efd8320b,563954a614242718bd125f16f9a3549f783346b8,563954a614242718bd125f16f9a3549f783346b8,dedc4dd9d78ac68775322fd8102f69019cfc6b1e,563954a614242718bd125f16f9a3549f783346b8..0be89e052428fe7185f56409cd9ac8282d29b036
@@@@@@ -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;
 ++ +                           }
                        }
                }
        }
Simple merge