diff options
author | Laurent Vivier <Laurent.Vivier@bull.net> | 2008-11-19 17:31:07 +0100 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2008-11-19 20:04:43 +0000 |
commit | a2686a55c4799f34dcaa60e14097ed0e8f5c9254 (patch) | |
tree | cc9d38a621fd9ebeb6ef9f63bfcc083fec1824b5 /src/drivers/block/ata.c | |
parent | b48f37e69a7101428b24900f8e1ba2c8a3561b32 (diff) | |
download | ipxe-a2686a55c4799f34dcaa60e14097ed0e8f5c9254.tar.gz |
[blockdev] Move block device operations to structure block_device_operations
Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Diffstat (limited to 'src/drivers/block/ata.c')
-rw-r--r-- | src/drivers/block/ata.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/drivers/block/ata.c b/src/drivers/block/ata.c index 555a5f6ec..c21d2f658 100644 --- a/src/drivers/block/ata.c +++ b/src/drivers/block/ata.c @@ -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 ); } |