From patchwork Tue Nov 27 00:02:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 1807561 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 26407DF2EB for ; Tue, 27 Nov 2012 00:02:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932897Ab2K0ACe (ORCPT ); Mon, 26 Nov 2012 19:02:34 -0500 Received: from perceval.ideasonboard.com ([95.142.166.194]:48914 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932883Ab2K0ACd (ORCPT ); Mon, 26 Nov 2012 19:02:33 -0500 Received: from avalon.ideasonboard.com (unknown [91.178.20.73]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1487535AF5; Tue, 27 Nov 2012 01:02:31 +0100 (CET) From: Laurent Pinchart To: linux-sh@vger.kernel.org Cc: Paul Mundt , Magnus Damm , Simon Horman , Linus Walleij , Kuninori Morimoto , Phil Edworthy , Nobuhiro Iwamatsu Subject: [PATCH v2 33/77] sh-pfc: Remove unused resource and num_resources platform data fields Date: Tue, 27 Nov 2012 01:02:32 +0100 Message-Id: <1353974596-30033-34-git-send-email-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1353974596-30033-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> References: <1353974596-30033-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org The fields are now unused, remove them. Signed-off-by: Laurent Pinchart Acked-by: Paul Mundt --- 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; };