On Fri, Oct 13, 2017 at 05:59:46PM +0200, Lucas Stach wrote: > Fix this by skipping all known alias numbers when assigning the dynamic IDs. > - id = idr_alloc(&spi_master_idr, ctlr, SPI_DYN_FIRST_BUS_NUM, 0, > - GFP_KERNEL); > + id = idr_alloc(&spi_master_idr, ctlr, > + of_alias_get_highest_id("spi") + 1, > + 0, GFP_KERNEL); I'll apply this but I'm wondering if we want to have the static bus number allocation also allocate that number out of the IDR so the IDR code handles things more transparently. Feels like it's more trouble than it's worth though, this should work fine. I'm also worrying about the case where IDR allocated a number before a static assignment got to it... not much we can do to guarantee that we avoid that case though.
Attachment:
signature.asc
Description: PGP signature