Re: [PATCH v2 2/5] spi: expand device name to include all CS lines for multi-CS devices
Nuno Sá <[email protected]>
| Newsgroups | org.kernel.vger.linux-spi,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <178611422284.552144.682342197592135692.b4-review@b4> |
On Mon, 03 Aug 2026 00:02:02 -0300, Jonathan Santos <[email protected]> wrote: > diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c > index 55fb96fea243..61423aee1525 100644 > --- a/drivers/spi/spi.c > +++ b/drivers/spi/spi.c > @@ -605,8 +607,12 @@ static void spi_dev_set_name(struct spi_device *spi) > return; > } > > - dev_set_name(&spi->dev, "%s.%u", dev_name(&spi->controller->dev), > - spi_get_chipselect(spi, 0)); > + cs_len = scnprintf(cs_str, sizeof(cs_str), "%u", spi_get_chipselect(spi, 0)); > + for (int idx = 1; idx < spi->num_chipselect; idx++) Why not unsigned int? - Nuno Sá -- Nuno Sá <[email protected]>