On 27/07/2015 17:19, Pavel Fedin wrote: >>> I'm just asking myself whether this is really necessary. Is the >>> automagic [*] really needed in this case? > In this particular case, perhaps, not. However, this automagic is > used not only with GPIOs. It is used also with memory regions, as > well as with some other places. Also, i thought that there could be > some hard to notice problems, when, for example, we first add > unnamed-gpio-in[0...1023], then add another 1024 pins, where count > again goes from 0 to 1023. And we would get collision and failure, > unless we know, that we already have 1024 objects with this name.
But IIUC qdev_init_gpio_in/out (the non-named variants) should only be called once. So if it breaks it's a feature. Paolo > So, > just for better safety, i decided to fix the mechanism itself instead > of changing use cases.