AMD IOMMU: convert iommu->need_sync to bool
authorJoerg Roedel <joerg.roedel@amd.com>
Wed, 10 Dec 2008 18:58:00 +0000 (19:58 +0100)
committerJoerg Roedel <joerg.roedel@amd.com>
Sat, 3 Jan 2009 13:11:57 +0000 (14:11 +0100)
Impact: use bool instead of int for iommu->need_sync

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
arch/x86/include/asm/amd_iommu_types.h
arch/x86/kernel/amd_iommu.c

index ee8cfa00017d51eaef61e99bcd11266a6bb5c82c..c4b144ece1f82a4b377da03e569cfaa4d49a8344 100644 (file)
@@ -302,7 +302,7 @@ struct amd_iommu {
        bool int_enabled;
 
        /* if one, we need to send a completion wait command */
-       int need_sync;
+       bool need_sync;
 
        /* default dma_ops domain for that IOMMU */
        struct dma_ops_domain *default_dom;
index a53cf48d3be8e35cc19f04b8b673f44a75c3aacb..e410e97e5b0aef0c9f6415f7a12826d69b47fba0 100644 (file)
@@ -198,7 +198,7 @@ static int iommu_queue_command(struct amd_iommu *iommu, struct iommu_cmd *cmd)
        spin_lock_irqsave(&iommu->lock, flags);
        ret = __iommu_queue_command(iommu, cmd);
        if (!ret)
-               iommu->need_sync = 1;
+               iommu->need_sync = true;
        spin_unlock_irqrestore(&iommu->lock, flags);
 
        return ret;
@@ -263,7 +263,7 @@ static int iommu_completion_wait(struct amd_iommu *iommu)
 
        ret = __iommu_completion_wait(iommu);
 
-       iommu->need_sync = 0;
+       iommu->need_sync = false;
 
        if (ret)
                goto out;