2002-11-06 14:03:32

by Adam J. Richter

[permalink] [raw]
Subject: Example patch (2.5.46): Using init_disk() in IDE

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
[email protected] \ / 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."


Attachments:
(No filename) (757.00 B)
diffs (7.38 kB)
Download all attachments