aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuniel Mahesh <sunil.m@techveda.org>2017-08-18 01:43:40 -0400
committerMark Brown <broonie@kernel.org>2017-08-18 07:15:41 -0400
commitb590782afe0a99fca84f451252ed7e2d64b2f155 (patch)
tree62e8882e05a8837e28e08f3eb761211bc712b392
parent5771a8c08880cdca3bfb4a3fc6d309d6bba20877 (diff)
spi: omap: Allocate bus number from spi framework
spi framework should allocate bus number dynamically either via Linux IDR or spi alias for master drivers. This patch deletes code pertaining to manual allocation of spi bus number in spi omap2 master driver. Signed-off-by: Suniel Mahesh <sunil.m@techveda.org> Signed-off-by: Karthik Tummala <karthik@techveda.org> Tested-by: Karthik Tummala <karthik@techveda.org> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/spi/spi-omap2-mcspi.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index e048268d8ba2..9bf64e6eca9b 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -1338,7 +1338,6 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
1338 struct resource *r; 1338 struct resource *r;
1339 int status = 0, i; 1339 int status = 0, i;
1340 u32 regs_offset = 0; 1340 u32 regs_offset = 0;
1341 static int bus_num = 1;
1342 struct device_node *node = pdev->dev.of_node; 1341 struct device_node *node = pdev->dev.of_node;
1343 const struct of_device_id *match; 1342 const struct of_device_id *match;
1344 1343
@@ -1374,14 +1373,11 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
1374 1373
1375 of_property_read_u32(node, "ti,spi-num-cs", &num_cs); 1374 of_property_read_u32(node, "ti,spi-num-cs", &num_cs);
1376 master->num_chipselect = num_cs; 1375 master->num_chipselect = num_cs;
1377 master->bus_num = bus_num++;
1378 if (of_get_property(node, "ti,pindir-d0-out-d1-in", NULL)) 1376 if (of_get_property(node, "ti,pindir-d0-out-d1-in", NULL))
1379 mcspi->pin_dir = MCSPI_PINDIR_D0_OUT_D1_IN; 1377 mcspi->pin_dir = MCSPI_PINDIR_D0_OUT_D1_IN;
1380 } else { 1378 } else {
1381 pdata = dev_get_platdata(&pdev->dev); 1379 pdata = dev_get_platdata(&pdev->dev);
1382 master->num_chipselect = pdata->num_cs; 1380 master->num_chipselect = pdata->num_cs;
1383 if (pdev->id != -1)
1384 master->bus_num = pdev->id;
1385 mcspi->pin_dir = pdata->pin_dir; 1381 mcspi->pin_dir = pdata->pin_dir;
1386 } 1382 }
1387 regs_offset = pdata->regs_offset; 1383 regs_offset = pdata->regs_offset;