[PATCH 1_4] Merge common get_dev() routines for block devices

Each of the filesystem drivers duplicate the get_dev routine.  This change
merges them into a single function in part.c

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
Grant Likely
2007-02-20 09:04:34 +01:00
committed by Stefan Roese
parent 620d3c9a14
commit 735dd97b1b
15 changed files with 82 additions and 125 deletions

View File

@@ -194,7 +194,7 @@ void scsi_init(void)
block_dev_desc_t * scsi_get_dev(int dev)
{
return((block_dev_desc_t *)&scsi_dev_desc[dev]);
return (dev < CFG_SCSI_MAX_DEVICE) ? &scsi_dev_desc[dev] : NULL;
}