Skip to content

Commit b590782

Browse files
sunielmaheshbroonie
authored andcommitted
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 <[email protected]> Signed-off-by: Karthik Tummala <[email protected]> Tested-by: Karthik Tummala <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 5771a8c commit b590782

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/spi/spi-omap2-mcspi.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,7 +1338,6 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
13381338
struct resource *r;
13391339
int status = 0, i;
13401340
u32 regs_offset = 0;
1341-
static int bus_num = 1;
13421341
struct device_node *node = pdev->dev.of_node;
13431342
const struct of_device_id *match;
13441343

@@ -1374,14 +1373,11 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
13741373

13751374
of_property_read_u32(node, "ti,spi-num-cs", &num_cs);
13761375
master->num_chipselect = num_cs;
1377-
master->bus_num = bus_num++;
13781376
if (of_get_property(node, "ti,pindir-d0-out-d1-in", NULL))
13791377
mcspi->pin_dir = MCSPI_PINDIR_D0_OUT_D1_IN;
13801378
} else {
13811379
pdata = dev_get_platdata(&pdev->dev);
13821380
master->num_chipselect = pdata->num_cs;
1383-
if (pdev->id != -1)
1384-
master->bus_num = pdev->id;
13851381
mcspi->pin_dir = pdata->pin_dir;
13861382
}
13871383
regs_offset = pdata->regs_offset;

0 commit comments

Comments
 (0)