Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753732AbcKRMC0 (ORCPT ); Fri, 18 Nov 2016 07:02:26 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:54934 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753600AbcKRMCM (ORCPT ); Fri, 18 Nov 2016 07:02:12 -0500 From: Mark Brown To: Nicolae Rosia Cc: Mark Brown , Tony Lindgren , Liam Girdwood , Mark Brown , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <1478954535-17325-2-git-send-email-Nicolae_Rosia@mentor.com> Message-Id: Date: Fri, 18 Nov 2016 12:02:03 +0000 X-SA-Exim-Connect-IP: 2001:470:1f1d:6b5::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Applied "regulator: twl: make driver DT only" to the regulator tree X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3306 Lines: 105 The patch regulator: twl: make driver DT only has been applied to the regulator tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 25d82337705e24203b27e23762144950f87a1016 Mon Sep 17 00:00:00 2001 From: Nicolae Rosia Date: Sat, 12 Nov 2016 14:42:12 +0200 Subject: [PATCH] regulator: twl: make driver DT only All users are DT only, remove unused code. Signed-off-by: Nicolae Rosia Signed-off-by: Mark Brown --- drivers/regulator/twl-regulator.c | 37 ++++++------------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index 23f7b31f6355..a777c9d0d2df 100644 --- a/drivers/regulator/twl-regulator.c +++ b/drivers/regulator/twl-regulator.c @@ -1175,37 +1175,20 @@ static int twlreg_probe(struct platform_device *pdev) struct regulator_init_data *initdata; struct regulation_constraints *c; struct regulator_dev *rdev; - struct twl_regulator_driver_data *drvdata; const struct of_device_id *match; struct regulator_config config = { }; match = of_match_device(twl_of_match, &pdev->dev); - if (match) { - template = match->data; - id = template->desc.id; - initdata = of_get_regulator_init_data(&pdev->dev, - pdev->dev.of_node, - &template->desc); - drvdata = NULL; - } else { - id = pdev->id; - initdata = dev_get_platdata(&pdev->dev); - for (i = 0, template = NULL; i < ARRAY_SIZE(twl_of_match); i++) { - template = twl_of_match[i].data; - if (template && template->desc.id == id) - break; - } - if (i == ARRAY_SIZE(twl_of_match)) - return -ENODEV; - - drvdata = initdata->driver_data; - if (!drvdata) - return -EINVAL; - } + if (!match) + return -ENODEV; + template = match->data; if (!template) return -ENODEV; + id = template->desc.id; + initdata = of_get_regulator_init_data(&pdev->dev, pdev->dev.of_node, + &template->desc); if (!initdata) return -EINVAL; @@ -1213,14 +1196,6 @@ static int twlreg_probe(struct platform_device *pdev) if (!info) return -ENOMEM; - if (drvdata) { - /* copy the driver data into regulator data */ - info->features = drvdata->features; - info->data = drvdata->data; - info->set_voltage = drvdata->set_voltage; - info->get_voltage = drvdata->get_voltage; - } - /* Constrain board-specific capabilities according to what * this driver and the chip itself can actually do. */ -- 2.10.2