Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: Move comment about chipselect check to the right place

The part of the comment about locking isn't that relevant compared to
the chip select check. So drop the sentence about locking.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20211007121415.2401638-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Uwe Kleine-König and committed by
Mark Brown
6bfb15f3 9e1ff307

+5 -4
+5 -4
drivers/spi/spi.c
··· 564 564 struct device *dev = ctlr->dev.parent; 565 565 int status; 566 566 567 + /* 568 + * We need to make sure there's no other device with this 569 + * chipselect **BEFORE** we call setup(), else we'll trash 570 + * its configuration. 571 + */ 567 572 status = bus_for_each_dev(&spi_bus_type, NULL, spi, spi_dev_check); 568 573 if (status) { 569 574 dev_err(dev, "chipselect %d already in use\n", ··· 637 632 /* Set the bus ID string */ 638 633 spi_dev_set_name(spi); 639 634 640 - /* We need to make sure there's no other device with this 641 - * chipselect **BEFORE** we call setup(), else we'll trash 642 - * its configuration. Lock against concurrent add() calls. 643 - */ 644 635 mutex_lock(&spi_add_lock); 645 636 status = __spi_add_device(spi); 646 637 mutex_unlock(&spi_add_lock);