From: Russell King Date: Thu, 9 Jul 2009 14:13:56 +0000 (+0100) Subject: MMC: MMCI: use AMBA bus accessors X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=012b7d339ce8c42d41e35b35c4acc3dd29501d52;p=linux-beck.git MMC: MMCI: use AMBA bus accessors Rather than open coding the accessors for decoding peripheral IDs, use the macros already provided. Signed-off-by: Russell King Acked-by: Linus Walleij --- diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index e1aa8471ab1c..ac43f395eec0 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -515,12 +515,12 @@ static int __devinit mmci_probe(struct amba_device *dev, struct amba_id *id) host = mmc_priv(mmc); host->mmc = mmc; - /* Bits 12 thru 19 is the designer */ - host->hw_designer = (dev->periphid >> 12) & 0xff; - /* Bits 20 thru 23 is the revison */ - host->hw_revision = (dev->periphid >> 20) & 0xf; + + host->hw_designer = amba_manf(dev); + host->hw_revision = amba_rev(dev); DBG(host, "designer ID = 0x%02x\n", host->hw_designer); DBG(host, "revision = 0x%01x\n", host->hw_revision); + host->clk = clk_get(&dev->dev, NULL); if (IS_ERR(host->clk)) { ret = PTR_ERR(host->clk);