summaryrefslogtreecommitdiffstats
path: root/src/drivers/block/ata.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/block/ata.c')
-rw-r--r--src/drivers/block/ata.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/drivers/block/ata.c b/src/drivers/block/ata.c
index 555a5f6e..c21d2f65 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 );
}