minor corrections to 2.4.10-pre6
PATCH 1/1 minor corrections to 2.4.10-pre6
Seeing that some version of my 07 patch made it into 2.4.10-pre6 I compared and noticed a few minor flaws:
- in DAC960.c and nftlcore.c unused variables have not been deleted
- in ps2esdi.c a semicolon is missing
- in hd.c add_gendisk() has a parameter too many
- in nftlcore.c there is a spurious :
Andries
[I hope to submit the rest of 07 some other time - there is nothing controversial in the rest I think, all could have been applied at once.]
linux/drivers/block/DAC960.c renamed from linux-2.4.10-pre6/linux/drivers/block/DAC960.c +0 -1
@@ -1883,7 +1883,6 @@static boolean DAC960_RegisterBlockDevice (DAC960_Controller_T *Controller) {int MajorNumber =DAC960_MAJOR + Controller->ControllerNumber; -GenericDiskInfo_T *GenericDiskInfo;RequestQueue_T *RequestQueue;int MinorNumber;/*
linux/drivers/block/ps2esdi.c renamed from linux-2.4.10-pre6/linux/drivers/block/ps2esdi.c +2 -3
@@ -222,14 +222,13 @@void cleanup_module (void ) { -if (ps2esdi_slot) - { +if (ps2esdi_slot) {mca_mark_as_unused (ps2esdi_slot);mca_set_adapter_procfn (ps2esdi_slot,NULL ,NULL ); }release_region (io_base,4 );free_dma (dma_arb_level); - free_irq(PS2ESDI_IRQ, NULL) +free_irq (PS2ESDI_IRQ ,NULL );devfs_unregister_blkdev (MAJOR_NR ,"ed" );del_gendisk (&ps2esdi_gendisk);blk_cleanup_queue (BLK_DEFAULT_QUEUE (MAJOR_NR ));
linux/drivers/ide/hd.c renamed from linux-2.4.10-pre6/linux/drivers/ide/hd.c +1 -1
@@ -842,7 +842,7 @@ }blk_init_queue (BLK_DEFAULT_QUEUE (MAJOR_NR ),DEVICE_REQUEST ); read_ahead[MAJOR_NR ] =8 ;/* 8 sector (4kB) read-ahead */ -add_gendisk (&hd_gendisk,MAJOR_NR ); +add_gendisk (&hd_gendisk);init_timer (&device_timer); device_timer.function = hd_times_out;hd_geninit ();
linux/drivers/mtd/nftlcore.c renamed from linux-2.4.10-pre6/linux/drivers/mtd/nftlcore.c +4 -19
@@ -1024,11 +1024,6 @@* ****************************************************************************/ -#if LINUX_VERSION_CODE <0x20212 && defined(MODULE ) -#define init_nftl init_module -#define cleanup_nftl cleanup_module -#endif -static struct mtd_notifier nftl_notifier = { add: NFTL_notify_add, remove: NFTL_notify_remove
@@ -1045,14 +1040,12 @@#endif if (register_blkdev (MAJOR_NR ,"nftl" , &nftl_fops)){ -printk ("unable to register NFTL block device on major %d\n" ,MAJOR_NR ); +printk ("unable to register NFTL block device on major %d\n" , +MAJOR_NR );return -EBUSY ; }else { -#if LINUX_VERSION_CODE <0x20320 - blk_dev[MAJOR_NR ].request_fn = nftl_request; -#else blk_init_queue (BLK_DEFAULT_QUEUE (MAJOR_NR ), &nftl_request); -#endif +/* set block size to 1kB each */ for (i =0 ; i <256 ; i++) { nftl_blocksizes[i] =1024 ;
@@ -1069,20 +1062,12 @@ static void __exit cleanup_nftl(void) { -struct gendisk *gd, **gdp; -unregister_mtd_user (&nftl_notifier);unregister_blkdev (MAJOR_NR ,"nftl" ); -#if LINUX_VERSION_CODE <0x20320 - blk_dev[MAJOR_NR ].request_fn =0 ; -#else blk_cleanup_queue (BLK_DEFAULT_QUEUE (MAJOR_NR )); -#endif -/* remove ourself from generic harddisk list -FIXME: why can't I found this partition on /proc/partition */ - del_gendisk(&nftl_gendisk);: +del_gendisk (&nftl_gendisk); }module_init (init_nftl);