Example patch (2.5.46): Using init_disk() in IDE

From: Adam J. Richter (adam@yggdrasil.com)
Date: Wed Nov 06 2002 - 09:09:51 EST


        To provide a real world example of how allowing struct gendisk
to be initialized from pointer, here is a port of drivers/ide to use
init_disk() instead of alloc_disk(), making the code 16 lines shorter
(well, two lines were from deleting unnecessary "drive->disk = NULL;"
statements, so 14 lines). I am running the resulting code now.

        I am not submitting these IDE changes yet. I wanted to
illustrate the clean-ups enabled by being able to initialize a struct
gendisk from a pointer.

-- 
Adam J. Richter     __     ______________   575 Oroville Road
adam@yggdrasil.com     \ /                  Milpitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America
                         "Free Software For The Rest Of Us."


- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Nov 07 2002 - 22:00:43 EST