regulator: Handle missing constraints in _regulator_disable()
[safe/jmp/linux-2.6] / drivers / uwb / whci.c
index 3df2388..2e27846 100644 (file)
@@ -67,11 +67,11 @@ int whci_wait_for(struct device *dev, u32 __iomem *reg, u32 mask, u32 result,
                val = le_readl(reg);
                if ((val & mask) == result)
                        break;
-               msleep(10);
                if (t >= max_ms) {
-                       dev_err(dev, "timed out waiting for %s ", tag);
+                       dev_err(dev, "%s timed out\n", tag);
                        return -ETIMEDOUT;
                }
+               msleep(10);
                t += 10;
        }
        return 0;
@@ -111,7 +111,7 @@ static int whci_add_cap(struct whci_card *card, int n)
                + UWBCAPDATA_TO_OFFSET(capdata);
        umc->resource.end    = umc->resource.start
                + (n == 0 ? 0x20 : UWBCAPDATA_TO_SIZE(capdata)) - 1;
-       umc->resource.name   = umc->dev.bus_id;
+       umc->resource.name   = dev_name(&umc->dev);
        umc->resource.flags  = card->pci->resource[bar].flags;
        umc->resource.parent = &card->pci->resource[bar];
        umc->irq             = card->pci->irq;
@@ -160,10 +160,10 @@ static int whci_probe(struct pci_dev *pci, const struct pci_device_id *id)
        pci_enable_msi(pci);
        pci_set_master(pci);
        err = -ENXIO;
-       if (!pci_set_dma_mask(pci, DMA_64BIT_MASK))
-               pci_set_consistent_dma_mask(pci, DMA_64BIT_MASK);
-       else if (!pci_set_dma_mask(pci, DMA_32BIT_MASK))
-               pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK);
+       if (!pci_set_dma_mask(pci, DMA_BIT_MASK(64)))
+               pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(64));
+       else if (!pci_set_dma_mask(pci, DMA_BIT_MASK(32)))
+               pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32));
        else
                goto error_dma;