From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Dmitry Torokhov" Subject: Re: Ever-increasing serio device number Date: Fri, 22 Jun 2007 15:30:50 -0400 Message-ID: References: <20070621230040.79fe959d@hyperion.delvare> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20070621230040.79fe959d@hyperion.delvare> Content-Disposition: inline Sender: owner-linux-input@atrey.karlin.mff.cuni.cz List-Help: List-Owner: List-Post: List-Unsubscribe: To: Jean Delvare Cc: linux-input@atrey.karlin.mff.cuni.cz List-Id: linux-input@vger.kernel.org Hi Ejan, On 6/21/07, Jean Delvare wrote: > 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). -- Dmitry