mirror of
https://github.com/ipxe/ipxe
synced 2026-01-01 17:34:42 +03:00
[blockdev] Move block device operations to structure block_device_operations
Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
This commit is contained in:
committed by
Michael Brown
parent
b48f37e69a
commit
a2686a55c4
@@ -139,6 +139,11 @@ static int ata_identify ( struct block_device *blockdev ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct block_device_operations ata_operations = {
|
||||
.read = ata_read,
|
||||
.write = ata_write
|
||||
};
|
||||
|
||||
/**
|
||||
* Initialise ATA device
|
||||
*
|
||||
@@ -153,7 +158,6 @@ static int ata_identify ( struct block_device *blockdev ) {
|
||||
*/
|
||||
int init_atadev ( struct ata_device *ata ) {
|
||||
/** Fill in read and write methods, and get device capacity */
|
||||
ata->blockdev.read = ata_read;
|
||||
ata->blockdev.write = ata_write;
|
||||
ata->blockdev.op = &ata_operations;
|
||||
return ata_identify ( &ata->blockdev );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user