From 6d4019d23a893fb5e23f5bb0cdf85c0882f94ed0 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Sun, 22 Feb 2009 10:26:02 +0000 Subject: [PATCH] Remove one more place of master/slave terms usage. --- sys/dev/ata/ata-all.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index f0d1cf7b286d..2033231df6ca 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -932,8 +932,7 @@ ata_atapi(device_t dev) struct ata_channel *ch = device_get_softc(device_get_parent(dev)); struct ata_device *atadev = device_get_softc(dev); - return ((atadev->unit == ATA_MASTER && ch->devices & ATA_ATAPI_MASTER) || - (atadev->unit == ATA_SLAVE && ch->devices & ATA_ATAPI_SLAVE)); + return (ch->devices & (ATA_ATAPI_MASTER << atadev->unit)); } int