diff options
author | Simon Glass <sjg@chromium.org> | 2022-08-11 19:34:53 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-09-16 11:05:16 -0400 |
commit | 606e0542b591efa5cf2927dfbfe9569c7264b01a (patch) | |
tree | 2065994bf47b88d706053fe46b30131dcdbd3ba3 /drivers | |
parent | 1c2e255334a222dc4070afff13a8b985ec9bb1b2 (diff) | |
download | u-boot-606e0542b591efa5cf2927dfbfe9569c7264b01a.zip u-boot-606e0542b591efa5cf2927dfbfe9569c7264b01a.tar.gz u-boot-606e0542b591efa5cf2927dfbfe9569c7264b01a.tar.bz2 |
ide: Use a flag for an ATAPI device
Rather than setting a different interface type, use a flag to indicate
that a device is ATAPI.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/ide.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/ide.c b/drivers/block/ide.c index 3270a9f..6bc48e3 100644 --- a/drivers/block/ide.c +++ b/drivers/block/ide.c @@ -525,8 +525,8 @@ static void ide_ident(struct blk_desc *dev_desc) { unsigned char c; hd_driveid_t iop; - #ifdef CONFIG_ATAPI + bool is_atapi = false; int retries = 0; #endif int device; @@ -550,7 +550,7 @@ static void ide_ident(struct blk_desc *dev_desc) (ide_inb(device, ATA_CYL_LOW) == 0x14) && (ide_inb(device, ATA_CYL_HIGH) == 0xEB)) { /* ATAPI Signature found */ - dev_desc->if_type = IF_TYPE_ATAPI; + is_atapi = true; /* * Start Ident Command */ @@ -623,7 +623,7 @@ static void ide_ident(struct blk_desc *dev_desc) dev_desc->removable = 0; #ifdef CONFIG_ATAPI - if (dev_desc->if_type == IF_TYPE_ATAPI) { + if (is_atapi) { atapi_inquiry(dev_desc); return; } |