From patchwork Tue Jul 3 20:10:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Mack X-Patchwork-Id: 10505163 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B1C8F60225 for ; Tue, 3 Jul 2018 20:10:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A226C289F1 for ; Tue, 3 Jul 2018 20:10:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 962FA28B30; Tue, 3 Jul 2018 20:10:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B7E9289F1 for ; Tue, 3 Jul 2018 20:10:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752887AbeGCUKi (ORCPT ); Tue, 3 Jul 2018 16:10:38 -0400 Received: from mail.bugwerft.de ([46.23.86.59]:39134 "EHLO mail.bugwerft.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752578AbeGCUKh (ORCPT ); Tue, 3 Jul 2018 16:10:37 -0400 Received: from localhost.localdomain (pD95EF73D.dip0.t-ipconnect.de [217.94.247.61]) by mail.bugwerft.de (Postfix) with ESMTPSA id 5C32D28D2E7; Tue, 3 Jul 2018 20:07:16 +0000 (UTC) From: Daniel Mack To: ulf.hansson@linaro.org Cc: robert.jarzmik@free.fr, linux-mmc@vger.kernel.org, Daniel Mack Subject: [PATCH 2/2] mmc: pxamci: provide a short-hand for &pdev->dev Date: Tue, 3 Jul 2018 22:10:27 +0200 Message-Id: <20180703201027.28752-3-daniel@zonque.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180703201027.28752-1-daniel@zonque.org> References: <20180703201027.28752-1-daniel@zonque.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Just a cosmetic cleanup with no functional impact. Signed-off-by: Daniel Mack --- drivers/mmc/host/pxamci.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c index f1297080d0e0..f7ffbf1676b1 100644 --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c @@ -613,6 +613,7 @@ static int pxamci_probe(struct platform_device *pdev) { struct mmc_host *mmc; struct pxamci_host *host = NULL; + struct device *dev = &pdev->dev; struct resource *r; int ret, irq; @@ -621,7 +622,7 @@ static int pxamci_probe(struct platform_device *pdev) if (irq < 0) return irq; - mmc = mmc_alloc_host(sizeof(struct pxamci_host), &pdev->dev); + mmc = mmc_alloc_host(sizeof(struct pxamci_host), dev); if (!mmc) { ret = -ENOMEM; goto out; @@ -659,7 +660,7 @@ static int pxamci_probe(struct platform_device *pdev) host->pdata = pdev->dev.platform_data; host->clkrt = CLKRT_OFF; - host->clk = devm_clk_get(&pdev->dev, NULL); + host->clk = devm_clk_get(dev, NULL); if (IS_ERR(host->clk)) { ret = PTR_ERR(host->clk); host->clk = NULL; @@ -692,7 +693,7 @@ static int pxamci_probe(struct platform_device *pdev) host->res = r; host->imask = MMC_I_MASK_ALL; - host->base = devm_ioremap_resource(&pdev->dev, r); + host->base = devm_ioremap_resource(dev, r); if (IS_ERR(host->base)) { ret = PTR_ERR(host->base); goto out; @@ -707,23 +708,23 @@ static int pxamci_probe(struct platform_device *pdev) writel(64, host->base + MMC_RESTO); writel(host->imask, host->base + MMC_I_MASK); - ret = devm_request_irq(&pdev->dev, irq, pxamci_irq, 0, + ret = devm_request_irq(dev, irq, pxamci_irq, 0, DRIVER_NAME, host); if (ret) goto out; platform_set_drvdata(pdev, mmc); - host->dma_chan_rx = dma_request_slave_channel(&pdev->dev, "rx"); + host->dma_chan_rx = dma_request_slave_channel(dev, "rx"); if (host->dma_chan_rx == NULL) { - dev_err(&pdev->dev, "unable to request rx dma channel\n"); + dev_err(dev, "unable to request rx dma channel\n"); ret = -ENODEV; goto out; } - host->dma_chan_tx = dma_request_slave_channel(&pdev->dev, "tx"); + host->dma_chan_tx = dma_request_slave_channel(dev, "tx"); if (host->dma_chan_tx == NULL) { - dev_err(&pdev->dev, "unable to request tx dma channel\n"); + dev_err(dev, "unable to request tx dma channel\n"); ret = -ENODEV; goto out; } @@ -736,10 +737,10 @@ static int pxamci_probe(struct platform_device *pdev) host->detect_delay_ms = host->pdata->detect_delay_ms; if (gpio_is_valid(gpio_power)) { - ret = devm_gpio_request(&pdev->dev, gpio_power, + ret = devm_gpio_request(dev, gpio_power, "mmc card power"); if (ret) { - dev_err(&pdev->dev, + dev_err(dev, "Failed requesting gpio_power %d\n", gpio_power); goto out; @@ -751,7 +752,7 @@ static int pxamci_probe(struct platform_device *pdev) if (gpio_is_valid(gpio_ro)) { ret = mmc_gpio_request_ro(mmc, gpio_ro); if (ret) { - dev_err(&pdev->dev, + dev_err(dev, "Failed requesting gpio_ro %d\n", gpio_ro); goto out; @@ -764,18 +765,18 @@ static int pxamci_probe(struct platform_device *pdev) if (gpio_is_valid(gpio_cd)) ret = mmc_gpio_request_cd(mmc, gpio_cd, 0); if (ret) { - dev_err(&pdev->dev, "Failed requesting gpio_cd %d\n", + dev_err(dev, "Failed requesting gpio_cd %d\n", gpio_cd); goto out; } if (host->pdata->init) - host->pdata->init(&pdev->dev, pxamci_detect_irq, mmc); + host->pdata->init(dev, pxamci_detect_irq, mmc); if (gpio_is_valid(gpio_power) && host->pdata->setpower) - dev_warn(&pdev->dev, "gpio_power and setpower() both defined\n"); + dev_warn(dev, "gpio_power and setpower() both defined\n"); if (gpio_is_valid(gpio_ro) && host->pdata->get_ro) - dev_warn(&pdev->dev, "gpio_ro and get_ro() both defined\n"); + dev_warn(dev, "gpio_ro and get_ro() both defined\n"); } mmc_add_host(mmc);