From: M. R. B. <mr...@us...> - 2002-11-03 14:23:17
|
Update of /cvsroot/linuxdc/linux-sh-dc/drivers/mtd/maps In directory usw-pr-cvs1:/tmp/cvs-serv25520/drivers/mtd/maps Modified Files: Tag: linux-sh-dc-2_4-branch vmu-flash.c Log Message: Add port/unit info to mtd_info->name Index: vmu-flash.c =================================================================== RCS file: /cvsroot/linuxdc/linux-sh-dc/drivers/mtd/maps/vmu-flash.c,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -u -d -r1.11 -r1.11.2.1 --- vmu-flash.c 11 Sep 2002 20:09:07 -0000 1.11 +++ vmu-flash.c 3 Nov 2002 14:23:14 -0000 1.11.2.1 @@ -25,7 +25,8 @@ static int VMU_BLOCK_SIZE; -#define _DEBUG_ +/* Define this to get debugging messages */ +/* #define _DEBUG_ */ #ifdef _DEBUG_ #define DEBGM(fmt, args...) (printk(KERN_INFO fmt, ##args)) @@ -37,7 +38,7 @@ /* MTD Information */ static struct mtd_info *vmu_flash_mtd = NULL; - +static unsigned char mtdname[40]; static struct mapleq *lastmq; static struct maple_driver dc_flashmap_driver; @@ -557,6 +558,7 @@ static int dc_flashmap_connect(struct maple_driver_data *d) { + DEBGM ("Registering VMU Flash mapping and loading VMU Flash driver\n"); @@ -595,7 +597,6 @@ unsigned long basic_flash_data = be32_to_cpu(((unsigned long *) (lastmq->recvbuf))[1 + bit_cnt - controller_here]); - /* Create a permanent record * With thanks to Marcus Comstedt */ @@ -631,7 +632,6 @@ return -1; } - do { interruptible_sleep_on_timeout(&wq_mq, 1); } while (lastmq == NULL); @@ -648,7 +648,8 @@ /* Populate a mtd_info */ vmu_flash_mtd = kmalloc(512, GFP_KERNEL); - vmu_flash_mtd->name = "Dreamcast VMU Flash"; + sprintf(mtdname, "Dreamcast VMU Flash @ %c%c", ('A' + mqu->port), ('0' + mqu->unit)); + vmu_flash_mtd->name = mtdname; /* This is 'other' */ vmu_flash_mtd->type = MTD_OTHER; |