aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-zpodd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/libata-zpodd.c')
-rw-r--r--drivers/ata/libata-zpodd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ata/libata-zpodd.c b/drivers/ata/libata-zpodd.c
index 90b159b740b3..cd8daf47188b 100644
--- a/drivers/ata/libata-zpodd.c
+++ b/drivers/ata/libata-zpodd.c
@@ -32,13 +32,14 @@ struct zpodd {
32 32
33static int eject_tray(struct ata_device *dev) 33static int eject_tray(struct ata_device *dev)
34{ 34{
35 struct ata_taskfile tf = {}; 35 struct ata_taskfile tf;
36 const char cdb[] = { GPCMD_START_STOP_UNIT, 36 const char cdb[] = { GPCMD_START_STOP_UNIT,
37 0, 0, 0, 37 0, 0, 0,
38 0x02, /* LoEj */ 38 0x02, /* LoEj */
39 0, 0, 0, 0, 0, 0, 0, 39 0, 0, 0, 0, 0, 0, 0,
40 }; 40 };
41 41
42 ata_tf_init(dev, &tf);
42 tf.flags = ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; 43 tf.flags = ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
43 tf.command = ATA_CMD_PACKET; 44 tf.command = ATA_CMD_PACKET;
44 tf.protocol = ATAPI_PROT_NODATA; 45 tf.protocol = ATAPI_PROT_NODATA;
@@ -52,8 +53,7 @@ static enum odd_mech_type zpodd_get_mech_type(struct ata_device *dev)
52 char buf[16]; 53 char buf[16];
53 unsigned int ret; 54 unsigned int ret;
54 struct rm_feature_desc *desc = (void *)(buf + 8); 55 struct rm_feature_desc *desc = (void *)(buf + 8);
55 struct ata_taskfile tf = {}; 56 struct ata_taskfile tf;
56
57 char cdb[] = { GPCMD_GET_CONFIGURATION, 57 char cdb[] = { GPCMD_GET_CONFIGURATION,
58 2, /* only 1 feature descriptor requested */ 58 2, /* only 1 feature descriptor requested */
59 0, 3, /* 3, removable medium feature */ 59 0, 3, /* 3, removable medium feature */
@@ -62,6 +62,7 @@ static enum odd_mech_type zpodd_get_mech_type(struct ata_device *dev)
62 0, 0, 0, 62 0, 0, 0,
63 }; 63 };
64 64
65 ata_tf_init(dev, &tf);
65 tf.flags = ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; 66 tf.flags = ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
66 tf.command = ATA_CMD_PACKET; 67 tf.command = ATA_CMD_PACKET;
67 tf.protocol = ATAPI_PROT_PIO; 68 tf.protocol = ATAPI_PROT_PIO;