lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1496072763-31209-11-git-send-email-benjamin.gaignard@linaro.org>
Date:   Mon, 29 May 2017 17:45:58 +0200
From:   Benjamin Gaignard <benjamin.gaignard@...aro.org>
To:     unlisted-recipients:; (no To-header on input)
Cc:     Benjamin Gaignard <benjamin.gaignard@...aro.org>,
        Lee Jones <lee.jones@...aro.org>, linux-kernel@...r.kernel.org
Subject: [PATCH 10/15] mfd: motorola-cpcap: use devm_of_platform_populate()

Usage of  devm_of_platform_populate() simplify driver code
by allowing to delete cpcap_remove().

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@...aro.org>

CC: Lee Jones <lee.jones@...aro.org>
CC: linux-kernel@...r.kernel.org
---
 drivers/mfd/motorola-cpcap.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/mfd/motorola-cpcap.c b/drivers/mfd/motorola-cpcap.c
index 3cab58a..d2cc1ea 100644
--- a/drivers/mfd/motorola-cpcap.c
+++ b/drivers/mfd/motorola-cpcap.c
@@ -260,17 +260,7 @@ static int cpcap_probe(struct spi_device *spi)
 	if (ret)
 		return ret;
 
-	return of_platform_populate(spi->dev.of_node, NULL, NULL,
-				    &cpcap->spi->dev);
-}
-
-static int cpcap_remove(struct spi_device *pdev)
-{
-	struct cpcap_ddata *cpcap = spi_get_drvdata(pdev);
-
-	of_platform_depopulate(&cpcap->spi->dev);
-
-	return 0;
+	return devm_of_platform_populate(&cpcap->spi->dev);
 }
 
 static struct spi_driver cpcap_driver = {
@@ -279,7 +269,6 @@ static int cpcap_remove(struct spi_device *pdev)
 		.of_match_table = cpcap_of_match,
 	},
 	.probe = cpcap_probe,
-	.remove = cpcap_remove,
 };
 module_spi_driver(cpcap_driver);
 
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ