]> git.karo-electronics.de Git - linux-beck.git/commit
scsi: Use ida for host number management
authorLee Duncan <lduncan@suse.com>
Wed, 20 Jan 2016 19:48:00 +0000 (11:48 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 24 Feb 2016 02:27:02 +0000 (21:27 -0500)
commit126a4fe010fd86cf3eaac9a481f0698e39dc3c0d
tree1e14f372d7e8eac390dabcad683fea6fb0f19c6f
parentd92ca9d3de862cb123d7ef0fd42dc1e9867dd590
scsi: Use ida for host number management

Update the SCSI hosts module to use ida to manage its host_no index
instead of an atomic integer. This means that the SCSI host number will
now be reclaimable.

Use the ida "simple" mechanism, since there should be no need for a
separate spin lock current usage. Ida was chosen over idr because the
hosts module already has its own instance and locking mechanisms that
aren't easily changed.

Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hosts.c