Ever-increasing serio device number
Hi Dmitry, hi all,
While developing my i2c-taos-evm driver [1], I noticed that my device was getting a new serio device number each time I cycled my driver. It started as serio2, and after an afternoon of testing, it was serio19. I'm curious, is this intended? I expected freed numbers to be reused, as i2c does.
If this isn't supposed to happen, would this be a bug in the serio driver, or in my driver (maybe not releasing some resource properly)?
Thanks.
[1] http://lists.lm-sensors.org/pipermail/i2c/2007-June/001508.html
Signature · 1 line
Jean Delvare
Hi Ejan,
Quoted 11 lines · Jean Delvare
Hi Dmitry, hi all,
While developing my i2c-taos-evm driver [1], I noticed that my device was getting a new serio device number each time I cycled my driver. It started as serio2, and after an afternoon of testing, it was serio19. I'm curious, is this intended? I expected freed numbers to be reused, as i2c does.
If this isn't supposed to happen, would this be a bug in the serio driver, or in my driver (maybe not releasing some resource properly)?
Serio system (as well as gameport and input core) simply assign next number for each newly registered serio device, it does not try to reuse old ids. If you want to identify a specific device you need to rely on phys and id/* attributes (when available).
Signature · 1 line
Dmitry