From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
To: linux-kernel@vger.kernel.org
Cc: Paul Mundt <lethal@linux-sh.org>,
Magnus Damm <magnus.damm@gmail.com>,
Simon Horman <horms@verge.net.au>,
Linus Walleij <linus.walleij@linaro.org>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Phil Edworthy <phil.edworthy@renesas.com>,
Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Subject: [PATCH 14/42] sh-pfc: Remove unused resource and num_resources platform data fields
Date: Wed, 21 Nov 2012 03:27:15 +0100 [thread overview]
Message-ID: <1353464863-10281-15-git-send-email-laurent.pinchart+renesas@ideasonboard.com> (raw)
In-Reply-To: <1353464863-10281-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com>
The fields are now unused, remove them.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
drivers/sh/pfc/core.c | 17 ++++-------------
include/linux/sh_pfc.h | 3 ---
2 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/drivers/sh/pfc/core.c b/drivers/sh/pfc/core.c
index eeec76f..68b40d8 100644
--- a/drivers/sh/pfc/core.c
+++ b/drivers/sh/pfc/core.c
@@ -41,31 +41,22 @@ static void pfc_iounmap(struct sh_pfc *pfc)
static int pfc_ioremap(struct sh_pfc *pfc, struct platform_device *pdev)
{
- unsigned int num_resources;
struct resource *res;
int k;
- if (pdev->num_resources) {
- num_resources = pdev->num_resources;
- res = pdev->resource;
- } else {
- num_resources = pfc->pdata->num_resources;
- res = pfc->pdata->resource;
- }
-
- if (num_resources == 0) {
+ if (pdev->num_resources == 0) {
pfc->num_windows = 0;
return 0;
}
- pfc->window = kzalloc(num_resources * sizeof(*pfc->window),
+ pfc->window = kzalloc(pdev->num_resources * sizeof(*pfc->window),
GFP_NOWAIT);
if (!pfc->window)
goto err1;
- pfc->num_windows = num_resources;
+ pfc->num_windows = pdev->num_resources;
- for (k = 0; k < num_resources; k++, res++) {
+ for (k = 0, res = pdev->resource; k < pdev->num_resources; k++, res++) {
WARN_ON(resource_type(res) != IORESOURCE_MEM);
pfc->window[k].phys = res->start;
pfc->window[k].size = resource_size(res);
diff --git a/include/linux/sh_pfc.h b/include/linux/sh_pfc.h
index fa1fec0..4f94233 100644
--- a/include/linux/sh_pfc.h
+++ b/include/linux/sh_pfc.h
@@ -111,9 +111,6 @@ struct sh_pfc_platform_data {
struct pinmux_irq *gpio_irq;
unsigned int gpio_irq_size;
- struct resource *resource;
- unsigned int num_resources;
-
unsigned long unlock_reg;
};
--
1.7.8.6
next prev parent reply other threads:[~2012-11-21 2:34 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-21 2:27 [PATCH 00/42] SH pin control and GPIO rework Laurent Pinchart
2012-11-21 2:27 ` [PATCH 01/42] sh-pfc: Split platform data from the sh_pfc structure Laurent Pinchart
2012-11-21 2:27 ` [PATCH 02/42] sh-pfc: Move private definitions and declarations to private header Laurent Pinchart
2012-11-21 2:27 ` [PATCH 03/42] sh-pfc: Merge PFC core and pinctrl Laurent Pinchart
2012-11-21 2:27 ` [PATCH 04/42] sh-pfc: Merge PFC core and gpio Laurent Pinchart
2012-11-21 2:27 ` [PATCH 05/42] sh-pfc: Move platform device and driver to the core Laurent Pinchart
2012-11-21 2:27 ` [PATCH 06/42] sh-pfc: Let the compiler decide whether to inline functions Laurent Pinchart
2012-11-21 2:27 ` [PATCH 07/42] sh-pfc: Remove check for impossible error condition Laurent Pinchart
2012-11-21 2:27 ` [PATCH 08/42] sh-pfc: Sort headers alphabetically Laurent Pinchart
2012-11-21 2:27 ` [PATCH 09/42] sh-pfc: Split platform device and platform driver registration Laurent Pinchart
2012-11-21 2:27 ` [PATCH 10/42] sh-pfc: Support passing resources through platform device Laurent Pinchart
2012-11-21 2:27 ` [PATCH 11/42] ARM: shmobile: Register PFC " Laurent Pinchart
2012-11-21 5:16 ` Simon Horman
2012-11-21 12:43 ` Laurent Pinchart
2012-11-26 1:02 ` Simon Horman
2012-11-26 10:34 ` Laurent Pinchart
2012-11-27 2:26 ` Simon Horman
2012-11-27 11:19 ` Laurent Pinchart
2012-11-28 0:58 ` Simon Horman
2012-11-21 2:27 ` [PATCH 12/42] SH: " Laurent Pinchart
2012-11-21 2:27 ` [PATCH 13/42] sh-pfc: Remove platform device registration Laurent Pinchart
2012-11-21 2:27 ` Laurent Pinchart [this message]
2012-11-21 2:27 ` [PATCH 15/42] ARM: shmobile: Select PINCTRL Laurent Pinchart
2012-11-21 2:27 ` [PATCH 16/42] sh: Select PINCTRL for CPU subtypes that require it Laurent Pinchart
2012-11-21 2:27 ` [PATCH 17/42] sh-pfc: Move driver from drivers/sh/ to drivers/pinctrl/ Laurent Pinchart
2012-11-21 3:28 ` viresh kumar
2012-11-21 13:17 ` Laurent Pinchart
2012-11-21 2:27 ` [PATCH 18/42] sh-pfc: Support pinmux info in driver data instead of platform data Laurent Pinchart
2012-11-21 2:27 ` [PATCH 19/42] sh-pfc: Add r8a7740 pinmux support Laurent Pinchart
2012-11-21 2:27 ` [PATCH 20/42] sh-pfc: Add r8a7779 " Laurent Pinchart
2012-11-21 2:27 ` [PATCH 21/42] sh-pfc: Add sh7367 " Laurent Pinchart
2012-11-22 4:56 ` Nobuhiro Iwamatsu
2012-11-21 2:27 ` [PATCH 22/42] sh-pfc: Add sh7372 " Laurent Pinchart
2012-11-21 2:27 ` [PATCH 23/42] sh-pfc: Add sh7377 " Laurent Pinchart
2012-11-22 4:55 ` Nobuhiro Iwamatsu
2012-11-22 11:12 ` Laurent Pinchart
2012-11-21 2:27 ` [PATCH 24/42] sh-pfc: Add sh73a0 " Laurent Pinchart
2012-11-21 2:27 ` [PATCH 25/42] ARM: shmobile: pfc: Use driver-provided pinmux info Laurent Pinchart
2012-11-21 2:27 ` [PATCH 26/42] sh-pfc: Add sh7203 pinmux support Laurent Pinchart
2012-11-21 2:27 ` [PATCH 27/42] sh-pfc: Add sh7264 " Laurent Pinchart
2012-11-21 2:27 ` [PATCH 28/42] sh-pfc: Add sh7269 " Laurent Pinchart
2012-11-21 2:27 ` [PATCH 29/42] sh-pfc: Add sh7720 " Laurent Pinchart
2012-11-21 2:27 ` [PATCH 30/42] sh-pfc: Add sh7722 " Laurent Pinchart
2012-11-21 2:27 ` [PATCH 31/42] sh-pfc: Add sh7723 " Laurent Pinchart
2012-11-21 2:27 ` [PATCH 32/42] sh-pfc: Add sh7724 " Laurent Pinchart
2012-11-21 2:27 ` [PATCH 33/42] sh-pfc: Add sh7734 " Laurent Pinchart
2012-11-21 2:27 ` [PATCH 34/42] sh-pfc: Add sh7757 " Laurent Pinchart
2012-11-21 2:27 ` [PATCH 35/42] sh-pfc: Add sh7785 " Laurent Pinchart
2012-11-21 2:27 ` [PATCH 36/42] sh-pfc: Add sh7786 " Laurent Pinchart
2012-11-21 2:27 ` [PATCH 37/42] sh-pfc: Add shx3 " Laurent Pinchart
2012-11-21 2:27 ` [PATCH 39/42] sh-pfc: Remove pinmux_info definition Laurent Pinchart
2012-11-21 2:27 ` [PATCH 40/42] sh-pfc: Move sh_pfc.h from include/linux/ to driver directory Laurent Pinchart
2012-11-21 2:27 ` [PATCH 41/42] ARM: shmobile: r8a7740: Add pin control resources Laurent Pinchart
2012-11-21 2:27 ` [PATCH 42/42] ARM: shmobile: sh7372: " Laurent Pinchart
2012-11-21 4:23 ` [PATCH 00/42] SH pin control and GPIO rework Paul Mundt
2012-11-21 14:51 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1353464863-10281-15-git-send-email-laurent.pinchart+renesas@ideasonboard.com \
--to=laurent.pinchart+renesas@ideasonboard.com \
--cc=horms@verge.net.au \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lethal@linux-sh.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=nobuhiro.iwamatsu.yj@renesas.com \
--cc=phil.edworthy@renesas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).