From patchwork Thu Jul 30 00:22:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 6896921 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EB5EEC05AC for ; Thu, 30 Jul 2015 00:24:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 19C7B203E9 for ; Thu, 30 Jul 2015 00:24:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7215820529 for ; Thu, 30 Jul 2015 00:24:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754743AbbG3AXi (ORCPT ); Wed, 29 Jul 2015 20:23:38 -0400 Received: from down.free-electrons.com ([37.187.137.238]:56687 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754643AbbG3AWg (ORCPT ); Wed, 29 Jul 2015 20:22:36 -0400 Received: by mail.free-electrons.com (Postfix, from userid 106) id 5128D29FB; Thu, 30 Jul 2015 02:22:34 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from localhost (128-79-216-6.hfc.dyn.abo.bbox.fr [128.79.216.6]) by mail.free-electrons.com (Postfix) with ESMTPSA id 4118D29FC; Thu, 30 Jul 2015 02:22:34 +0200 (CEST) From: Alexandre Belloni To: Nicolas Ferre Cc: Boris Brezillon , Maxime Ripard , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Alexandre Belloni , Sebastian Reichel , Dmitry Eremin-Solenikov , linux-pm@vger.kernel.org Subject: [PATCH 16/20] power/reset: at91-reset: remove useless at91_reset_platform_probe() Date: Thu, 30 Jul 2015 02:22:02 +0200 Message-Id: <1438215726-27452-17-git-send-email-alexandre.belloni@free-electrons.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1438215726-27452-1-git-send-email-alexandre.belloni@free-electrons.com> References: <1438215726-27452-1-git-send-email-alexandre.belloni@free-electrons.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since all the at91 platforms are now DT only, at91_reset_platform_probe() is now useless, remove it. Signed-off-by: Alexandre Belloni --- Cc: Sebastian Reichel Cc: Dmitry Eremin-Solenikov Cc: linux-pm@vger.kernel.org drivers/power/reset/at91-reset.c | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/drivers/power/reset/at91-reset.c b/drivers/power/reset/at91-reset.c index 36dc52fb2ec8..3e8f478385c1 100644 --- a/drivers/power/reset/at91-reset.c +++ b/drivers/power/reset/at91-reset.c @@ -195,46 +195,12 @@ static int at91_reset_of_probe(struct platform_device *pdev) return register_restart_handler(&at91_restart_nb); } -static int at91_reset_platform_probe(struct platform_device *pdev) -{ - const struct platform_device_id *match; - struct resource *res; - int idx = 0; - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - at91_rstc_base = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(at91_rstc_base)) { - dev_err(&pdev->dev, "Could not map reset controller address\n"); - return PTR_ERR(at91_rstc_base); - } - - for (idx = 0; idx < 2; idx++) { - res = platform_get_resource(pdev, IORESOURCE_MEM, idx + 1 ); - at91_ramc_base[idx] = devm_ioremap(&pdev->dev, res->start, - resource_size(res)); - if (!at91_ramc_base[idx]) { - dev_err(&pdev->dev, "Could not map ram controller address\n"); - return -ENOMEM; - } - } - - match = platform_get_device_id(pdev); - at91_restart_nb.notifier_call = - (int (*)(struct notifier_block *, - unsigned long, void *)) match->driver_data; - - return register_restart_handler(&at91_restart_nb); -} - static int at91_reset_probe(struct platform_device *pdev) { int ret; - if (pdev->dev.of_node) - ret = at91_reset_of_probe(pdev); - else - ret = at91_reset_platform_probe(pdev); + ret = at91_reset_of_probe(pdev); if (ret) return ret;