From patchwork Fri May 23 10:31:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 30740 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f69.google.com (mail-pb0-f69.google.com [209.85.160.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 120F72066E for ; Fri, 23 May 2014 10:42:47 +0000 (UTC) Received: by mail-pb0-f69.google.com with SMTP id uo5sf17343267pbc.8 for ; Fri, 23 May 2014 03:42:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=0uKmFC/LO3WP9G/g7IC+7W7OOXy+FjiBTnYZF/XB384=; b=hedfCXYWsskGcfGW7AJITKvPvkbLTDVzTGtOuX24e+uY/WCBGsPHChOWdd0tCVWPE1 po5049CSGnoq1TDU3XvuGjquki+nEFzvKwrnUB129WEpRETxRLyUD43FjIX0LpedxTtL dqMa5XK2gTtoPRDwcshZkMn8QJGzlM0hzElKvMbmqeTKs13BgdjtOR6zHg8u/FqOqJ32 2dgmjmpiatxJsN4QF87Nwa59IQ1KbJEfF0AfQUHX5dcq4Ly6tEYDO9QtMg+yq0T0587l RgOz7Jp8CKryUcbksIZcZrgAML7XeT7onO4sFf+KrFIEzl4Br4+WxLAo4ROx9gpdzxdw poXQ== X-Gm-Message-State: ALoCoQmyZ/dqSeWfa4tSKkGOiB4ibdA01wo/0PxFStA1ZnC8gg1xFO8SpE1u3cjh/koN+cjg0z/J X-Received: by 10.66.222.129 with SMTP id qm1mr1802999pac.6.1400841767113; Fri, 23 May 2014 03:42:47 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.145 with SMTP id g17ls1727441qge.76.gmail; Fri, 23 May 2014 03:42:47 -0700 (PDT) X-Received: by 10.58.198.107 with SMTP id jb11mr3528229vec.10.1400841767005; Fri, 23 May 2014 03:42:47 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id cl9si1379512vdd.81.2014.05.23.03.42.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 May 2014 03:42:46 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id hq11so208570vcb.22 for ; Fri, 23 May 2014 03:42:46 -0700 (PDT) X-Received: by 10.52.96.8 with SMTP id do8mr1781613vdb.4.1400841766879; Fri, 23 May 2014 03:42:46 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp20429vcb; Fri, 23 May 2014 03:42:46 -0700 (PDT) X-Received: by 10.140.29.226 with SMTP id b89mr5111390qgb.48.1400841766425; Fri, 23 May 2014 03:42:46 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id z66si2992009qgd.33.2014.05.23.03.42.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 May 2014 03:42:46 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WnmuF-0001K2-CH; Fri, 23 May 2014 10:40:55 +0000 Received: from mail-we0-f179.google.com ([74.125.82.179]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wnmlx-0001HH-JY for linux-arm-kernel@lists.infradead.org; Fri, 23 May 2014 10:32:22 +0000 Received: by mail-we0-f179.google.com with SMTP id q59so4567150wes.24 for ; Fri, 23 May 2014 03:32:04 -0700 (PDT) X-Received: by 10.180.206.163 with SMTP id lp3mr2349957wic.29.1400841124503; Fri, 23 May 2014 03:32:04 -0700 (PDT) Received: from localhost.localdomain (AToulouse-654-1-404-187.w82-125.abo.wanadoo.fr. [82.125.3.187]) by mx.google.com with ESMTPSA id s9sm2200908wix.13.2014.05.23.03.32.03 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 May 2014 03:32:03 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de, mingo@kernel.org Subject: [PATCH 23/71] clocksource: sh_tmu: Rename struct sh_tmu_priv to sh_tmu_device Date: Fri, 23 May 2014 12:31:03 +0200 Message-Id: <1400841111-6683-23-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1400841111-6683-1-git-send-email-daniel.lezcano@linaro.org> References: <537F214C.8000700@linaro.org> <1400841111-6683-1-git-send-email-daniel.lezcano@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140523_033221_850784_C0E30361 X-CRM114-Status: GOOD ( 17.46 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.2 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.179 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Laurent Pinchart Channel data is private as well, rename priv to device to make the distrinction between the core device and the channels clearer. Signed-off-by: Laurent Pinchart --- drivers/clocksource/sh_tmu.c | 68 +++++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c index 26457e1..7013790 100644 --- a/drivers/clocksource/sh_tmu.c +++ b/drivers/clocksource/sh_tmu.c @@ -35,10 +35,10 @@ #include #include -struct sh_tmu_priv; +struct sh_tmu_device; struct sh_tmu_channel { - struct sh_tmu_priv *tmu; + struct sh_tmu_device *tmu; int irq; @@ -50,7 +50,7 @@ struct sh_tmu_channel { unsigned int enable_count; }; -struct sh_tmu_priv { +struct sh_tmu_device { struct platform_device *pdev; void __iomem *mapbase; @@ -436,59 +436,59 @@ static int sh_tmu_register(struct sh_tmu_channel *ch, char *name, return 0; } -static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev) +static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev) { struct sh_timer_config *cfg = pdev->dev.platform_data; struct resource *res; int ret; ret = -ENXIO; - memset(p, 0, sizeof(*p)); - p->pdev = pdev; + memset(tmu, 0, sizeof(*tmu)); + tmu->pdev = pdev; if (!cfg) { - dev_err(&p->pdev->dev, "missing platform data\n"); + dev_err(&tmu->pdev->dev, "missing platform data\n"); goto err0; } - platform_set_drvdata(pdev, p); + platform_set_drvdata(pdev, tmu); - res = platform_get_resource(p->pdev, IORESOURCE_MEM, 0); + res = platform_get_resource(tmu->pdev, IORESOURCE_MEM, 0); if (!res) { - dev_err(&p->pdev->dev, "failed to get I/O memory\n"); + dev_err(&tmu->pdev->dev, "failed to get I/O memory\n"); goto err0; } - p->channel.irq = platform_get_irq(p->pdev, 0); - if (p->channel.irq < 0) { - dev_err(&p->pdev->dev, "failed to get irq\n"); + tmu->channel.irq = platform_get_irq(tmu->pdev, 0); + if (tmu->channel.irq < 0) { + dev_err(&tmu->pdev->dev, "failed to get irq\n"); goto err0; } /* map memory, let mapbase point to our channel */ - p->mapbase = ioremap_nocache(res->start, resource_size(res)); - if (p->mapbase == NULL) { - dev_err(&p->pdev->dev, "failed to remap I/O memory\n"); + tmu->mapbase = ioremap_nocache(res->start, resource_size(res)); + if (tmu->mapbase == NULL) { + dev_err(&tmu->pdev->dev, "failed to remap I/O memory\n"); goto err0; } /* get hold of clock */ - p->clk = clk_get(&p->pdev->dev, "tmu_fck"); - if (IS_ERR(p->clk)) { - dev_err(&p->pdev->dev, "cannot get clock\n"); - ret = PTR_ERR(p->clk); + tmu->clk = clk_get(&tmu->pdev->dev, "tmu_fck"); + if (IS_ERR(tmu->clk)) { + dev_err(&tmu->pdev->dev, "cannot get clock\n"); + ret = PTR_ERR(tmu->clk); goto err1; } - ret = clk_prepare(p->clk); + ret = clk_prepare(tmu->clk); if (ret < 0) goto err2; - p->channel.cs_enabled = false; - p->channel.enable_count = 0; - p->channel.tmu = p; + tmu->channel.cs_enabled = false; + tmu->channel.enable_count = 0; + tmu->channel.tmu = tmu; - ret = sh_tmu_register(&p->channel, (char *)dev_name(&p->pdev->dev), + ret = sh_tmu_register(&tmu->channel, (char *)dev_name(&tmu->pdev->dev), cfg->clockevent_rating, cfg->clocksource_rating); if (ret < 0) @@ -497,18 +497,18 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev) return 0; err3: - clk_unprepare(p->clk); + clk_unprepare(tmu->clk); err2: - clk_put(p->clk); + clk_put(tmu->clk); err1: - iounmap(p->mapbase); + iounmap(tmu->mapbase); err0: return ret; } static int sh_tmu_probe(struct platform_device *pdev) { - struct sh_tmu_priv *p = platform_get_drvdata(pdev); + struct sh_tmu_device *tmu = platform_get_drvdata(pdev); struct sh_timer_config *cfg = pdev->dev.platform_data; int ret; @@ -517,20 +517,20 @@ static int sh_tmu_probe(struct platform_device *pdev) pm_runtime_enable(&pdev->dev); } - if (p) { + if (tmu) { dev_info(&pdev->dev, "kept as earlytimer\n"); goto out; } - p = kmalloc(sizeof(*p), GFP_KERNEL); - if (p == NULL) { + tmu = kmalloc(sizeof(*tmu), GFP_KERNEL); + if (tmu == NULL) { dev_err(&pdev->dev, "failed to allocate driver data\n"); return -ENOMEM; } - ret = sh_tmu_setup(p, pdev); + ret = sh_tmu_setup(tmu, pdev); if (ret) { - kfree(p); + kfree(tmu); pm_runtime_idle(&pdev->dev); return ret; }